live updates for boards

Signed-off-by: chandi Langecker <git@chandi.it>
This commit is contained in:
chandi Langecker
2022-11-21 20:10:27 +01:00
committed by Julius Härtl
parent 9674c344ea
commit 322ee92573
8 changed files with 88 additions and 9 deletions

View File

@@ -52,6 +52,18 @@ hasPush = listen('deck_board_update', (name, body) => {
store.dispatch('refreshBoard', currentBoardId)
})
listen('deck_card_update', (name, body) => {
// ignore update events which we have triggered ourselves
if (isOurSessionToken(body._causingSessionToken)) return
// only handle update events for the currently open board
const currentBoardId = store.state.currentBoard?.id
if (body.boardId !== currentBoardId) return
store.dispatch('loadStacks', currentBoardId)
})
/**
* is the notify_push app active and can
* provide us with real time updates?