Fixed wrong chat-count in Notification

This commit is contained in:
MineTec committed 2023-08-20 20:37:37 +02:00
1 parent ca9cf687ea
commit a73aea0986
2 files changed
+4 -2

No files matched your search

+1 -1
View File
@@ -24,7 +24,7 @@ class NotificationController {
),
).run().then((value) {
var messageCount = value.data.map((e) => e.unreadMessages).reduce((a, b) => a + b);
var chatCount = value.data.map((e) => e.unreadMessages).length;
var chatCount = value.data.where((e) => e.unreadMessages > 0).length;
var people = value.data.where((e) => e.unreadMessages > 0).map((e) => e.displayName.split(" ")[0]);
final NotificationService service = NotificationService();