Recompute channels unread total after cachedChannels is updated
This commit is contained in:
1 parent
d3c7d8e43a
commit
77018dc358
1 file changed
+1
-1
@@ -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