Merge pull request #165 from GetStream/hotfix/markREad

do not call markread if channel does not support it
This commit is contained in:
Sahil Kumar
2020-12-04 11:02:56 +05:30
committed by GitHub
+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(() {