Merge pull request #652 from GetStream/hotfix/unreadIndicator

fix(llc): unread count not updating
This commit is contained in:
Salvatore Giordano
2021-08-31 15:23:43 +02:00
committed by GitHub
2 changed files with 5 additions and 2 deletions
+1
View File
@@ -2,6 +2,7 @@
🐞 Fixed
- Fixed unread indicator not updating correctly
- Fix `channel.show` not working because of null body
## 2.2.0
@@ -1488,7 +1488,7 @@ class ChannelClientState {
_listenMemberRemoved();
_computeInitialUnread();
_computeUnread();
_startCleaning();
@@ -1512,7 +1512,7 @@ class ChannelClientState {
final _subscriptions = <StreamSubscription>[];
void _computeInitialUnread() {
void _computeUnread() {
final userRead = channelState.read.firstWhereOrNull(
(r) => r.user.id == _channel._client.state.currentUser?.id,
);
@@ -1934,6 +1934,8 @@ class ChannelClientState {
read: newReads,
pinnedMessages: updatedState.pinnedMessages,
);
_computeUnread();
}
int _sortByCreatedAt(Message a, Message b) =>