mirror of
https://github.com/wekan/wekan.git
synced 2026-11-25 10:48:06 -05:00
Observe the card that opened each details view and clear desktop, mobile route, and popup state when another client removes it or moves it to a different board. Add positive, negative, wiring, and mobile browser regressions.\n\nThanks to rptl and xet7 !\n\nFixes #3114,
12 lines
497 B
JavaScript
12 lines
497 B
JavaScript
'use strict';
|
|
|
|
// Decide whether a card-details window still belongs on the board where it was
|
|
// opened. A missing card means another client deleted/archived it (or moved it
|
|
// outside the current publication); a changed boardId means it was moved to a
|
|
// different board while another subscription still happens to retain it.
|
|
function openCardIsUnavailable(card, openedBoardId) {
|
|
return !card || !openedBoardId || card.boardId !== openedBoardId;
|
|
}
|
|
|
|
module.exports = { openCardIsUnavailable };
|