Skip to content
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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to use scrollToMessage when the message is not present in list #5237

Closed
rixon08 opened this issue Apr 18, 2024 · 1 comment
Closed
Labels
bug Something isn't working

Comments

@rixon08
Copy link

rixon08 commented Apr 18, 2024

Describe the bug
I tried to use scrollToMessage in MessageListView to message that not present in list and nothing happend. But it works when message is already present in list. How to make scroll to message that not present in list?

SDK version

  • 6.2.3
@rixon08 rixon08 added the bug Something isn't working label Apr 18, 2024
@JcMinarro
Copy link
Member

Hello @rixon08
The method MessageListView.scrollToMessage() as described on its Javadoc, only scroll to messages that are already added to the view.
If you want to scroll to a message that hasn't been fetched yet, it needs to be fetched before to scroll to it.
If you are using our ViewModel, you can call the MessageListViewModel.onEvent() method providing a ShowMessage instance with the desired message id to scroll to.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants