PagingLibraryWithRxJava
My approach on how to use Google PagingLibrary with RxJava
It allows for:
- Easy invalidation of the data by changing the JourneyRequest to be loaded:
journeyRepository.journey.onNext(JourneyRequest(...)
- Retries when connectivity is lost and then it comes back.
- Easy to integrate with swipe to refresh, by just calling invalidate:
journeyPagingDataSourceFactory.journeyDataSource.invalidate()