mitchtabian / Open-API-Android-App

Kotlin, MVI, Hilt, Retrofit2, Coroutines, Room Persistence, REST API, Token Authentication
690 stars 230 forks source link

paging some times doesn't work #25

Open razaghimahdi opened 3 years ago

razaghimahdi commented 3 years ago

so as i said paging doesn't work sometime for example: i turn on airplane mode and try to paging and i dont get new item which is correct by now b/c i dont have any network but after turning off airplane mode which it should paging works but it doesnt and i have to refersh list(swipe refresh) to paging work again, maybe we need a listener for checking network to update onUpdateQueryExhausted()?

mitchtabian commented 3 years ago

Or you don't have anything in the cache so there is no more results? I think it "looks" like paging isn't working because the network fails immediately and getting data from the cache is so fast that no progress bar shows.

razaghimahdi commented 3 years ago

so maybe it should checks first network is available or not then if it was unavailable get from caching, all i say it's user shouldn't refresh list to make paging works again, what do u think?(maybe i make it so hard :))) )

mitchtabian commented 3 years ago

feel free to create a PR