fix(core): do not move a channel when the new message is a thread reply
This commit is contained in:
@@ -174,6 +174,9 @@ class ChannelsBlocState extends State<ChannelsBloc>
|
|||||||
EventType.messageNew,
|
EventType.messageNew,
|
||||||
)
|
)
|
||||||
.listen((e) {
|
.listen((e) {
|
||||||
|
if (e.message?.parentId != null && e.message?.showInChannel != true) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
final newChannels = List<Channel>.from(channels ?? []);
|
final newChannels = List<Channel>.from(channels ?? []);
|
||||||
final index = newChannels.indexWhere((c) => c.cid == e.cid);
|
final index = newChannels.indexWhere((c) => c.cid == e.cid);
|
||||||
if (index != -1) {
|
if (index != -1) {
|
||||||
|
|||||||
Reference in New Issue
Block a user