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
Search for a term with finite results in the current version of the app (I sought for orestis)
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.
Description
Fixed some logical errors;
lastRequestedPage
incrementation is skipped if not going through therequestMore
so added to therequestAndSaveData
instead as it was leading to erroneous countingRequesting 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
orestis
)