mirror of
https://github.com/zjs81/meshcore-open.git
synced 2026-08-01 16:15:56 +10:00
fix: filter by _shouldTrackUnreadForContactKey when recalculating cached contacts unread total
This commit is contained in:
@@ -360,7 +360,13 @@ class MeshCoreConnector extends ChangeNotifier {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void _recalculateCachedContactsUnreadTotal() {
|
void _recalculateCachedContactsUnreadTotal() {
|
||||||
_cachedContactsUnreadTotal = _contactUnreadCount.values.fold(0, (a, b) => a + b);
|
int total = 0;
|
||||||
|
_contactUnreadCount.forEach((contactKeyHex, count) {
|
||||||
|
if (_shouldTrackUnreadForContactKey(contactKeyHex)) {
|
||||||
|
total += count;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
_cachedContactsUnreadTotal = total;
|
||||||
}
|
}
|
||||||
|
|
||||||
void _recalculateCachedChannelsUnreadTotal() {
|
void _recalculateCachedChannelsUnreadTotal() {
|
||||||
|
|||||||
Reference in New Issue
Block a user