From 2e846c0f9f916b42cfe381c0d56ec33b63ee7a25 Mon Sep 17 00:00:00 2001 From: Salvatore Giordano Date: Thu, 3 Dec 2020 17:03:52 +0100 Subject: [PATCH] do not call markread if channel does not support it --- lib/src/message_list_view.dart | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/src/message_list_view.dart b/lib/src/message_list_view.dart index 296656e6..2bbf4b82 100644 --- a/lib/src/message_list_view.dart +++ b/lib/src/message_list_view.dart @@ -532,7 +532,8 @@ class _MessageListViewState extends State { newMessages.first.id != _messages.first.id) { if (!_scrollController.hasClients || _scrollController.offset < _newMessageLoadingOffset) { - if (streamChannel.channel.state.unreadCount > 0) { + if (streamChannel.channel.state.unreadCount > 0 && + streamChannel.channel.config?.readEvents == true) { streamChannel.channel.markRead(); } setState(() {