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

No reloading is triggered, when top of log is reached. #94

Closed
maralorn opened this issue Oct 10, 2016 · 1 comment
Closed

No reloading is triggered, when top of log is reached. #94

maralorn opened this issue Oct 10, 2016 · 1 comment
Assignees
Labels
enhancement A feature or change request for Quaternion

Comments

@maralorn
Copy link
Contributor

maralorn commented Oct 10, 2016

When scrolling upwards, more history get’s pulled in. But I can scroll so fast upwards, that I reach the upper end of log where no reload get’s triggered. I actually have to bounce the view against the top again and again everytime I want to pull more history.

@KitsuneRal KitsuneRal self-assigned this Mar 8, 2017
@KitsuneRal KitsuneRal added the enhancement A feature or change request for Quaternion label Mar 8, 2017
@KitsuneRal
Copy link
Member

After some minor refactoring and experimenting I think I've found I way to make fetching historical messages so unobtrusive that you can scroll yourself away. The respective (very small) PR for libqmatrixclient is already submitted and hopefully will be merged soon; the Quaternion PR will follow shortly afterwards.

KitsuneRal added a commit to KitsuneRal/Quaternion that referenced this issue Mar 9, 2017
…w much to fetch

* getPreviousContent() won't be triggered during the model resetting; this should prevent unnecessary fetching reported in quotient-im#118.
* Previously we used a hard 5-pixel margin to check if it's time to scroll and fetched strictly 10 messages. This led to stuttering when scrolling far back the timeline, as reported in quotient-im#94. The new code calculates whether there are enough pixels above to scroll at the same speed for the nearest 2 seconds, and if not, fetches additional messages that would amount to about 3 additional seconds of scrolling (assuming that an average height of a fetched message in pixels will be the same as the average message height for the already loaded timeline).

Closes quotient-im#94, quotient-im#118
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement A feature or change request for Quaternion
Projects
None yet
Development

No branches or pull requests

2 participants