You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In an app with Offline Support enabled, I attempted to read messages from a channel while offline. The channel had 1 new unread message. Upon attempting to load the channel, all messages were cleared from the state and the view failed to render. Channels without unread messages could still be read.
Steps to reproduce
1. Enable offline persistance in an app.
2. View a chat channel while online.
3. Exit the channel view.
4. Recieve a new message in the previously viewed channel while online.
5. Go offline.
6. Attempt to view the chat channel which now contains an unread message.
Supporting info to reproduce
This appears to be caused by the following line in the _queryAtTimestamp method of StreamChannelState:
channel.state!.truncate();
I also believe there may be larger issues with this flow, as 'channel.state!.isUpToDate = false;' being called there prevents the markReadWhenAtTheBottom parameter from functioning as expected due to line 1524 of message_list_view.dart 'if (_upToDate && allowMarkRead && canMarkReadAtBottom) {' being triggered before isUpToDate is ever set back to true.
Relevant log output
Flutter analyze output
Flutter doctor output
Code of Conduct
I agree to follow this project's Code of Conduct
The text was updated successfully, but these errors were encountered:
Which packages are you using?
stream_chat_flutter
On what platforms did you experience the issue?
iOS
What version are you using?
9.1.0
What happened?
In an app with Offline Support enabled, I attempted to read messages from a channel while offline. The channel had 1 new unread message. Upon attempting to load the channel, all messages were cleared from the state and the view failed to render. Channels without unread messages could still be read.
Steps to reproduce
Supporting info to reproduce
This appears to be caused by the following line in the _queryAtTimestamp method of StreamChannelState:
channel.state!.truncate();
I also believe there may be larger issues with this flow, as 'channel.state!.isUpToDate = false;' being called there prevents the markReadWhenAtTheBottom parameter from functioning as expected due to line 1524 of message_list_view.dart 'if (_upToDate && allowMarkRead && canMarkReadAtBottom) {' being triggered before isUpToDate is ever set back to true.
Relevant log output
Flutter analyze output
Flutter doctor output
Code of Conduct
The text was updated successfully, but these errors were encountered: