Fixed wrong chat-count in Notification
This commit is contained in:
@ -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();
|
||||
|
Reference in New Issue
Block a user