chore(llc): Update current user in event.unreadChannels,.totalUnreadCount

Signed-off-by: xsahil03x <[email protected]>
This commit is contained in:
Sahil Kumar
2021-09-08 18:43:32 +05:30
committed by xsahil03x
parent f4e37e23d6
commit 94636f2115
@@ -1371,12 +1371,16 @@ class ClientState {
.on() .on()
.map((event) => event.unreadChannels) .map((event) => event.unreadChannels)
.whereType<int>() .whereType<int>()
.listen(_unreadChannelsController.add), .listen((count) {
currentUser = currentUser?.copyWith(unreadChannels: count);
}),
_client _client
.on() .on()
.map((event) => event.totalUnreadCount) .map((event) => event.totalUnreadCount)
.whereType<int>() .whereType<int>()
.listen(_totalUnreadCountController.add), .listen((count) {
currentUser = currentUser?.copyWith(totalUnreadCount: count);
}),
]); ]);
_listenChannelDeleted(); _listenChannelDeleted();