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

New page error "try again" may fail due to invisibleItemsThreshold #332

Open
dbmessina opened this issue Jun 12, 2024 · 1 comment
Open
Labels
bug Something isn't working

Comments

@dbmessina
Copy link

In my app, I was experiencing the behavior of pressing "try again" on a new page error and it would switch to the loading spinner indefinitely as it was never making a new page request. Eventually I found the solution to be lowering my invisibleItemsThreshold which I had set to 10. At least on my device, any value of 8 or less will work. However, I believe this is a bug as I don't understand why a threshold intended for scrolling should have any impact on a manual request.

This can be easily reproduced in the example app by setting a high invisibleItemsThreshold assuming you've replaced the defunct API it uses with something else.

@clragon clragon added the bug Something isn't working label Jun 12, 2024
@clragon
Copy link
Collaborator

clragon commented Oct 13, 2024

The reason for this is that the way the retry button works is by clearing the error.
Once the error is cleared, the layout would get updated and set its flag for having requested a page back to false.
Then, once the threshold item is built, a new page would be requested.

A situation where the threshold item is not in view when this happens is rare, but with a high threshold, imaginable.
I will see if I can fix this.

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