InfiniteScroll won't work when loading from local db

Let’s say I used the app for the first time. I paginated till page 10. They all save in the db. When I come back to the app again. The api hits with page = 1. I scroll to the bottom the api will hit with page = 2.

What would be a better solution to this? Save the last page info in db or preferences?