How to load next pages object when i swip up in my listview?

  • There are essentially two calls happening in parallel since both of them are asynchronous.
  • When you call prepareNextPage it may happen that the first find call will use the modified dataQuery object because it happens immediately after you call first find
  • What I would recommend is to change the flow of the code where the second find is called only after you receive the result for the first find (which based on your description should happen later on anyway, that is when the user reaches the end of the list in the UI)
1 Like