Merge pull request #652 from GetStream/hotfix/unreadIndicator
fix(llc): unread count not updating
This commit is contained in:
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
🐞 Fixed
|
🐞 Fixed
|
||||||
|
|
||||||
|
- Fixed unread indicator not updating correctly
|
||||||
- Fix `channel.show` not working because of null body
|
- Fix `channel.show` not working because of null body
|
||||||
|
|
||||||
## 2.2.0
|
## 2.2.0
|
||||||
|
|||||||
@@ -1488,7 +1488,7 @@ class ChannelClientState {
|
|||||||
|
|
||||||
_listenMemberRemoved();
|
_listenMemberRemoved();
|
||||||
|
|
||||||
_computeInitialUnread();
|
_computeUnread();
|
||||||
|
|
||||||
_startCleaning();
|
_startCleaning();
|
||||||
|
|
||||||
@@ -1512,7 +1512,7 @@ class ChannelClientState {
|
|||||||
|
|
||||||
final _subscriptions = <StreamSubscription>[];
|
final _subscriptions = <StreamSubscription>[];
|
||||||
|
|
||||||
void _computeInitialUnread() {
|
void _computeUnread() {
|
||||||
final userRead = channelState.read.firstWhereOrNull(
|
final userRead = channelState.read.firstWhereOrNull(
|
||||||
(r) => r.user.id == _channel._client.state.currentUser?.id,
|
(r) => r.user.id == _channel._client.state.currentUser?.id,
|
||||||
);
|
);
|
||||||
@@ -1934,6 +1934,8 @@ class ChannelClientState {
|
|||||||
read: newReads,
|
read: newReads,
|
||||||
pinnedMessages: updatedState.pinnedMessages,
|
pinnedMessages: updatedState.pinnedMessages,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
_computeUnread();
|
||||||
}
|
}
|
||||||
|
|
||||||
int _sortByCreatedAt(Message a, Message b) =>
|
int _sortByCreatedAt(Message a, Message b) =>
|
||||||
|
|||||||
Reference in New Issue
Block a user