https://kotlinlang.org logo
#compose
Title
# compose
k

Kshitij Patil

12/20/2020, 10:26 AM
Does anyone have paging 3 RemoteMediator implementation with Jetpack Compose?
z

ziv kesten

12/20/2020, 11:50 AM
You can look at my implementation here: https://github.com/zivkesten/Compose-Tv-Show-tracking-App/blob/Implement_paging_si[…]c/main/java/com/zk/trackshows/repository/ShowsRemoteMediator.kt However i should point out that the remote mediator would not behave different for compose as it does for regular view system. The difference would only be the way you consume the PagingData flow. In the view system you would feed it to your PagedAdapter. In compose you would invoke an extension function written for Flow<PagingData<T> called “collectAsLazyPagingItems” and returns a lazyItems object that can be fed to a “LazyColumn” or “LazyRow”
👍 1
43 Views