New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: scroll to bottom issue when the message list is empty #2471
Conversation
} else { | ||
setScrollToBottomButtonVisible(true); | ||
setScrollToBottomButtonVisible(false); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this seems like a big change...
have you also tested with jump to message? its in sample-app mention screen
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This works fine.
@@ -805,13 +805,15 @@ const MessageListWithContext = < | |||
|
|||
const handleScroll: ScrollViewProps['onScroll'] = (event) => { | |||
const offset = event.nativeEvent.contentOffset.y; | |||
const messageListHasMessages = channel.state.messages.length > 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how about thread list here? a thread list can also be empty right ?
you have to check this via the thread screen.. when navigating to a thread screen directly channel.state.messages.length
has no relation..
so then we have to check the length of the message list that is used to render I believe
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it should be processedMessageList.length
here in my view
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed 馃憤馃徎
馃帀 This PR is included in version 5.27.0 馃帀 The release is available on: Your semantic-release bot 馃摝馃殌 |
馃幆 Goal
The goal of the PR is to solve the scroll-to-bottom visible issue when the message list is empty and also not to show the scroll-to-bottom button after the offset is reached.
PFA the video attached that shows the previous and new behaviour(as per the PR):
Previous:
IMG_6093.MOV
New:
IMG_6092.MOV
馃洜 Implementation details
馃帹 UI Changes
iOS
Android
馃И Testing
鈽戯笍 Checklist
develop
branch