Merge pull request #831 from GetStream/hotfix/channelsOrder

fix(core): channels order
This commit is contained in:
Salvatore Giordano
2022-01-07 11:08:46 +01:00
committed by GitHub
2 changed files with 9 additions and 0 deletions
@@ -1,3 +1,9 @@
## Upcoming
🐞 Fixed
- Do not move a channel to top if the new message is from a thread.
## 3.3.1
- Updated `stream_chat` dependency to [`3.3.1`](https://pub.dev/packages/stream_chat/changelog).
@@ -174,6 +174,9 @@ class ChannelsBlocState extends State<ChannelsBloc>
EventType.messageNew,
)
.listen((e) {
if (e.message?.parentId != null && e.message?.showInChannel != true) {
return;
}
final newChannels = List<Channel>.from(channels ?? []);
final index = newChannels.indexWhere((c) => c.cid == e.cid);
if (index != -1) {