do not call markread if channel does not support it

This commit is contained in:
Salvatore Giordano
2020-12-03 17:03:52 +01:00
parent 0520470f46
commit 2e846c0f9f
+2 -1
View File
@@ -532,7 +532,8 @@ class _MessageListViewState extends State<MessageListView> {
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(() {