From 54977de7fd13fc954e2689a43cc88b2452b47669 Mon Sep 17 00:00:00 2001 From: Salvatore Giordano Date: Thu, 16 Dec 2021 11:31:13 +0100 Subject: [PATCH] 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) {