Paging 3 database + network doesn't load the offline data from database when opening the app without internet connection in the sample. The codelab has the same issue too.
Seems to be similar to the second issue here: http://issuetracker.google.com//issues/158892717
Make sure your loadStateFlow / loadStateListener on PagingDataAdapter is not checking for mediator refresh, but only for source / local refresh.
https://developer.android.com/reference/kotlin/androidx/paging/CombinedLoadStates
Note the implementation for CombinedLoadStates.refresh is to default to mediator if it exists.
Would be great if u could provide a sample code snippet for that.
I'm trying to understand how it works too.
@dlam any updates ?
I ended up giving this a shot and found a bug which is blocking this behavior.
The fix if you're interested in tracking progress is wip here: https://android-review.googlesource.com/c/platform/frameworks/support/+/1341068
Thanks @dlam . will check it out.
This is fixed now and will go out with the alpha02 release.