fix: filter by _shouldTrackUnreadForContactKey when recalculating cached contacts unread total

This commit is contained in:
Serge Tarkovski
2026-02-27 12:28:57 +02:00
parent a30fc439f3
commit c47a4cb622
+7 -1
View File
@@ -360,7 +360,13 @@ class MeshCoreConnector extends ChangeNotifier {
}
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() {