-
Notifications
You must be signed in to change notification settings - Fork 509
Fix initial scroll of unread messages marker #5873
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
Fix initial scroll of unread messages marker #5873
Conversation
|
with a bit of luck this change will also make conversation switching feel even faster because now the new unread messages are loaded right away in the first call instead of waiting for the second one. |
|
PRs against master are now "23" |
|
/backport to stable22 |
|
temp test plan while still debugging, I've pushed a WIP with log statements.
|
|
The new approach seems to work but has a tiny glitch: the initial conversation load has the read marker at the bottom and it stays there until
This delay might be annoying if someone scrolls up manually while the code is between getOldMessages and lookForNewMessages, because then it will force-scroll back to the read marker. In theory we could detect those scrolls and cancel the automatic scroll then. Seems a bit overcomplicated though. |
7d7a9aa to
ecbcf2c
Compare
Scroll at the right moments to make both the initial scroll and the one when coming back to an already loaded conversation work. Signed-off-by: Vincent Petry <[email protected]>
ecbcf2c to
6ebddc1
Compare
For the initial scroll to work, the first call to getOldMessages must
fetch messages beyond the read marker itself. Otherwise the marker will
appear at the bottom of the screen as there aren't any new messages yet
until
lookForNewMessagesruns.Fixes #5872
Tests with conversation that has a lot of new unread messages: