fix(llc): Fix channelState.copyWith with respect to pinnedMessages.

Signed-off-by: xsahil03x <[email protected]>
This commit is contained in:
Sahil Kumar
2022-02-21 15:31:23 +05:30
committed by xsahil03x
parent 5e29418531
commit ae44406b96
2 changed files with 5 additions and 3 deletions
+1
View File
@@ -10,6 +10,7 @@
- [[#890]](https://github.com/GetStream/stream-chat-flutter/pull/890) Fixed Reactions not updating on thread messages.
Thanks [bstolinski](https://github.com/bstolinski).
- [[#897]](https://github.com/GetStream/stream-chat-flutter/issues/897) Fixed error type mis-match in `AuthInterceptor`.
- Fix `channelState.copyWith` with respect to pinnedMessages.
## 3.4.0
@@ -67,9 +67,10 @@ class ChannelState {
members: members ?? this.members,
// Hack to avoid using the default value in case nothing is provided.
// FIXME: Use non-nullable by default instead of empty list.
pinnedMessages: pinnedMessages == _emptyPinnedMessages
? this.pinnedMessages
: pinnedMessages ?? _emptyPinnedMessages,
pinnedMessages:
pinnedMessages == null || pinnedMessages == _emptyPinnedMessages
? this.pinnedMessages
: pinnedMessages,
watcherCount: watcherCount ?? this.watcherCount,
watchers: watchers ?? this.watchers,
read: read ?? this.read,