Join Slack
Powered by
Good evening everyone, is there a nice way to fetc...
# rx
u
ubu
07/29/2018, 9:50 PM
Good evening everyone, is there a nice way to fetch paginated data from backend using retrofit and rxjava adapter? Recursion? Thanks.
m
Max Russek
07/30/2018, 1:44 AM
Not really much of an Rx solution but if you are on Android you could use the paging library:
https://developer.android.com/topic/libraries/architecture/paging/
h
hmole
07/30/2018, 8:28 AM
Observable .range(START_FROM_PAGE, Integer.MAX_VALUE) .concatMapSingle { page -> getPageSource(filter, page, perPage) } .map { map your data } .takeUntil { check for end }
➕ 2
2
Views
Open in Slack
Previous
Next