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

Issue with preloading, if fetch index is far from visible zone. #11

Closed
xsahil03x opened this issue Dec 1, 2024 · 0 comments · Fixed by #12
Closed

Issue with preloading, if fetch index is far from visible zone. #11

xsahil03x opened this issue Dec 1, 2024 · 0 comments · Fixed by #12

Comments

@xsahil03x
Copy link
Owner

xsahil03x commented Dec 1, 2024

Hello! PR #9 fixes the main issue, but there is still an issue with preloading, if fetch index is far from visible zone.

  1. Suppose that page key is the id of message [each message has id = text = ordering number, e.g. Message(id=1, text=1)]
  2. We load the page with key = 20 (id of first visible message), pageSize = 45, prefetchIndex = 22.
  3. It is expected that pager will trigger previous page (with key = 1)
  4. We have loaded full page (from 20 to 65), but the prefetchIndex is far from visible zone, we have to scroll to item 20+22 = 42 to trigger prepend. In that case prefetchIndex < itemsCount, meaning that fix with if (prefetchIndex > itemCount) { ... } will be ignored
Снимок экрана 2024-11-30 в 11 27 22 Снимок экрана 2024-11-30 в 11 27 22 Снимок экрана 2024-11-30 в 11 27 46

Originally posted by @dinaraparanid in #8 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant