fix(core): do not move a channel when the new message is a thread reply

This commit is contained in:
Salvatore Giordano
2021-12-16 11:31:13 +01:00
parent 536fb45d5b
commit 54977de7fd
@@ -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) {