mirror of
https://github.com/balzack/databag.git
synced 2025-02-12 03:29:16 +00:00
clear remote channels from disconnecting contacts
This commit is contained in:
parent
d914de9e00
commit
f991db4e30
@ -263,7 +263,6 @@ export function useCardContext() {
|
||||
await syncCard(card);
|
||||
}
|
||||
else {
|
||||
//TODO clear card channel topics
|
||||
await store.actions.clearCardChannelItems(guid, card.id);
|
||||
await store.actions.clearCardItem(guid, card.id);
|
||||
cards.current.delete(card.id);
|
||||
@ -312,7 +311,7 @@ export function useCardContext() {
|
||||
await updateCardChannelItems(card.id, cardServer, cardToken, notifiedView, null);
|
||||
await store.actions.setCardItemNotifiedChannel(guid, card.id, notifiedChannel);
|
||||
await store.actions.setCardItemNotifiedView(guid, card.id, notifiedView);
|
||||
clearCardChannel(card.id);
|
||||
clearCardChannels(card.id);
|
||||
}
|
||||
else {
|
||||
if (status.notifiedChannel != notifiedChannel) {
|
||||
@ -336,6 +335,10 @@ export function useCardContext() {
|
||||
setCardOffsync(card.id, 1);
|
||||
}
|
||||
}
|
||||
else {
|
||||
await store.actions.clearCardChannelItems(guid, card.id);
|
||||
clearCardChannels(card.id);
|
||||
}
|
||||
}
|
||||
|
||||
const updateCardChannelItems = async (cardId, cardServer, cardToken, notifiedView, notifiedChannel) => {
|
||||
|
Loading…
Reference in New Issue
Block a user