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

Bug: Endless fetching on finite lists #216

Open
wants to merge 1 commit into
base: master_old
Choose a base branch
from

Conversation

ogartaganis
Copy link

Description

Fixed some logical errors;

  • lastRequestedPage incrementation is skipped if not going through the requestMore so added to the requestAndSaveData instead as it was leading to erroneous counting

  • Requesting was endless even though the results might have been finite. Fixed by keeping the totalItemCount from the response and adding it to the condition of either to request more or not.

Testing

  1. Search for a term with finite results in the current version of the app (I sought for orestis)
  2. Observe the logs. Even tho the results are 78 (at time of writing), the search goes on and on adding pages. It gets worse as you scroll up and down.

- lastRequested page incrementation is skipped if not going through the "Request more" so added to the requestAndSaveData instead as it was leading to erroneous counting
- Requesting was endless even though the results might have been finite. Fixed by keeping the totalItemCount from the response and adding it to the condition of either to request more or not.
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 this pull request may close these issues.

None yet

1 participant