diff --git a/app/mobile/src/context/useCardContext.hook.js b/app/mobile/src/context/useCardContext.hook.js index edc47570..a696dd46 100644 --- a/app/mobile/src/context/useCardContext.hook.js +++ b/app/mobile/src/context/useCardContext.hook.js @@ -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) => {