Recompute channels unread total after cachedChannels is updated

chore/offband-rebrand
Serge Tarkovski 2 months ago
parent d3c7d8e43a
commit 77018dc358

@ -3442,6 +3442,7 @@ class MeshCoreConnector extends ChangeNotifier {
// Cache channels for offline use
_cachedChannels = List<Channel>.from(_channels);
unawaited(_channelStore.saveChannels(_channels));
_recalculateCachedChannelsUnreadTotal();
// Apply ordering and notify UI
_applyChannelOrder();
@ -3460,7 +3461,6 @@ class MeshCoreConnector extends ChangeNotifier {
if (completed) {
_hasLoadedChannels = true;
_previousChannelsCache.clear();
_recalculateCachedChannelsUnreadTotal();
}
// Fallback: if contact sync was deferred waiting for channel 0 but

Loading…
Cancel
Save

Powered by TurnKey Linux.