Status Update
Comments
pe...@gmail.com <pe...@gmail.com> #2
Hello, can you please attach a sample that reproduces your error?
pe...@gmail.com <pe...@gmail.com> #3
I’ve attached two screen recordings demonstrating the mediator's behavior during the first and second launches after installation. Additionally,
yb...@google.com <yb...@google.com> #4
Based on first_launch_after_installation.mp4
, your paging state is indeed showing null
for nextKey, so it makes sense that Paging concluded there are no more items to load.
So I think the question is why the PagingState
contains only an empty page and null
values. My guess is either
- RemoteMediator REFRESH actually returned empty data - what is the returned
allNewsItems
value on initial REFRESH? - RemoteMediator REFRESH successfully loaded data and inserted it into database, but Paging hasn't processed that yet by the time Append is triggered, so PagingState is empty.
The second case doesn't seem likely though.
If you attach an executable app, I can look into this further.
Otherwise, you may gain more insight through Paging logs with adb shell setprop log.tag.Paging VERBOSE
. You can also try implementing RemoteKeys
in this
du...@google.com <du...@google.com> #5
Hey! I ran into this same issue. It is in fact the second case you mentioned and is documented
I've published a repo
pe...@gmail.com <pe...@gmail.com> #6
And there seems to be no way out of it. Plus, If there was a loading footer, it never disappears. It's stuck.
yb...@google.com <yb...@google.com> #7
This is a reasonable feature request but due to how paging works internally, it won't be easy to support (except for the footer bug, that looks like a bug :) )
Description
Version used: 3.0.0
Devices/Android versions reproduced on: Samsung J3 (Android 8), Emulator (Android 11)
Hello,
If the paging adapter has some data and is refreshed via adapter.refresh with (for example) swipe to refresh, then if the refresh fails, the paging stops working. Moreover, if there was an ongoing append that doesn't finish before the refresh error and the LoadStateFooter was displayed, it never disappears.
I believe this to be a common use case and the paging should continue even after refresh error.
Thank you.
- Attached screen recording of both issues
- Reproducible in the paging sample