mirror of
https://github.com/zjs81/meshcore-open.git
synced 2026-06-30 14:10:30 +10:00
Recompute channels unread total after cachedChannels is updated
This commit is contained in:
@@ -3442,6 +3442,7 @@ class MeshCoreConnector extends ChangeNotifier {
|
|||||||
// Cache channels for offline use
|
// Cache channels for offline use
|
||||||
_cachedChannels = List<Channel>.from(_channels);
|
_cachedChannels = List<Channel>.from(_channels);
|
||||||
unawaited(_channelStore.saveChannels(_channels));
|
unawaited(_channelStore.saveChannels(_channels));
|
||||||
|
_recalculateCachedChannelsUnreadTotal();
|
||||||
|
|
||||||
// Apply ordering and notify UI
|
// Apply ordering and notify UI
|
||||||
_applyChannelOrder();
|
_applyChannelOrder();
|
||||||
@@ -3460,7 +3461,6 @@ class MeshCoreConnector extends ChangeNotifier {
|
|||||||
if (completed) {
|
if (completed) {
|
||||||
_hasLoadedChannels = true;
|
_hasLoadedChannels = true;
|
||||||
_previousChannelsCache.clear();
|
_previousChannelsCache.clear();
|
||||||
_recalculateCachedChannelsUnreadTotal();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Fallback: if contact sync was deferred waiting for channel 0 but
|
// Fallback: if contact sync was deferred waiting for channel 0 but
|
||||||
|
|||||||
Reference in New Issue
Block a user