Merge branch 'feat/two-way-pagination' of github.com:GetStream/stream-chat-flutter into feat/two-way-pagination
This commit is contained in:
@@ -523,6 +523,7 @@ class _MessageListViewState extends State<MessageListView> {
|
|||||||
_bottomPaginationActive = false;
|
_bottomPaginationActive = false;
|
||||||
_topPaginationActive = false;
|
_topPaginationActive = false;
|
||||||
streamChannel.reloadChannel();
|
streamChannel.reloadChannel();
|
||||||
|
streamChannel.channel.markRead();
|
||||||
} else {
|
} else {
|
||||||
setState(() => _showScrollToBottom = false);
|
setState(() => _showScrollToBottom = false);
|
||||||
_scrollController.scrollTo(
|
_scrollController.scrollTo(
|
||||||
@@ -654,7 +655,8 @@ class _MessageListViewState extends State<MessageListView> {
|
|||||||
onVisibilityChanged: (visibility) {
|
onVisibilityChanged: (visibility) {
|
||||||
final isVisible = visibility.visibleBounds != Rect.zero;
|
final isVisible = visibility.visibleBounds != Rect.zero;
|
||||||
if (isVisible && !_bottomWasVisible) {
|
if (isVisible && !_bottomWasVisible) {
|
||||||
if (streamChannel.channel.config?.readEvents == true &&
|
if (streamChannel.channel.state.isUpToDate &&
|
||||||
|
streamChannel.channel.config?.readEvents == true &&
|
||||||
streamChannel.channel.state.unreadCount > 0) {
|
streamChannel.channel.state.unreadCount > 0) {
|
||||||
streamChannel.channel.markRead();
|
streamChannel.channel.markRead();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user