From 54977de7fd13fc954e2689a43cc88b2452b47669 Mon Sep 17 00:00:00 2001 From: Salvatore Giordano Date: Thu, 16 Dec 2021 11:31:13 +0100 Subject: [PATCH 1/2] fix(core): do not move a channel when the new message is a thread reply --- packages/stream_chat_flutter_core/lib/src/channels_bloc.dart | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/stream_chat_flutter_core/lib/src/channels_bloc.dart b/packages/stream_chat_flutter_core/lib/src/channels_bloc.dart index 0e8d48bc..f0065bcb 100644 --- a/packages/stream_chat_flutter_core/lib/src/channels_bloc.dart +++ b/packages/stream_chat_flutter_core/lib/src/channels_bloc.dart @@ -174,6 +174,9 @@ class ChannelsBlocState extends State EventType.messageNew, ) .listen((e) { + if (e.message?.parentId != null && e.message?.showInChannel != true) { + return; + } final newChannels = List.from(channels ?? []); final index = newChannels.indexWhere((c) => c.cid == e.cid); if (index != -1) { From 63f8c40cb9a9501a9a6463da041415efec481d60 Mon Sep 17 00:00:00 2001 From: Salvatore Giordano Date: Thu, 16 Dec 2021 11:32:04 +0100 Subject: [PATCH 2/2] chore(core): update changelog --- packages/stream_chat_flutter_core/CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/stream_chat_flutter_core/CHANGELOG.md b/packages/stream_chat_flutter_core/CHANGELOG.md index b69c4262..99d3a3c2 100644 --- a/packages/stream_chat_flutter_core/CHANGELOG.md +++ b/packages/stream_chat_flutter_core/CHANGELOG.md @@ -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).