Hello all. I have a RemoteMediator Paging 3 compose. But my id is a unique string (for example “sj-8kjh76”) that I get from the server. How can I load new items using append?
Copy code
val loadKey = when(loadType){
LoadType.REFRESH -> 1
LoadType.PREPEND -> return MediatorResult.Success(
endOfPaginationReached = true
)
LoadType.APPEND -> {
return MediatorResult.Success(
endOfPaginationReached = true
)
// You must explicitly check if the last item is null when
// appending, since passing null to networkService is only
// valid for initial load. If lastItem is null it means no
// items were loaded after the initial REFRESH and there are
// no more items to load.
}
}