-
Notifications
You must be signed in to change notification settings - Fork 15
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
Not remembering position in all cases #936
Comments
nikclayton
added a commit
that referenced
this issue
Sep 25, 2024
Previous code saved the reading position of a fully visible status. But there are situations where no status is fully visible. 1. The user is in the middle of viewing a status longer than the screen height, and the top/bottom of the status are off the top/bottom of the screen. 2. The user has scrolled between two statuses. Collectively they are longer than the screen height, and the top of one status is off the top of the screen and the bottom of the other status is off the bottom of the screen. In both cases the user's reading position was not saved. In these situations use the ID of the status closest to the bottom of the screen, even if not fully visible. This should ensure the user never missing anything. Fixes #936
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Occasional reports (through to 2.8.1) that the reading position is not remembered in all cases.
Current code looks something like this:
The problem is -- what happens if there is no item that is completely visible.
Consider a post that is longer than the screen. It's not completely visible, so
id
is null and the position is not saved.Or consider two posts that are individually shorter than the screen, but if the user is scrolled so that they are both visible, neither of them is fully visible. Again, since neither post is fully visible
id
will be null and the position is not saved.Solution is probably to fall back to the saving the position of the last visible item if no item is fully visible.
The text was updated successfully, but these errors were encountered: