Status Update
Comments
jo...@google.com <jo...@google.com> #2
Hello, can you please attach a sample that reproduces your error?
le...@google.com <le...@google.com> #3
I’ve attached two screen recordings demonstrating the mediator's behavior during the first and second launches after installation. Additionally,
sh...@gmail.com <sh...@gmail.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
Description
I am using Modifier.Node to create custom modifiers in Compose. I need a way to load some general dependencies when the modifier is created and destroy them when the modifier is destroyed not detatched from the composition. However, there is no onDestroy callback in Modifier.Node that I can use for this purpose. The existing onAttach and onDetach callbacks are not sufficient, since they are only triggered when the modifier is attached or detached from the parent, but the node might be reused later. Therefore, I request a feature to add an onDestroy callback in Modifier.Node that is executed when the modifier is disposed.
Steps to reproduce: N/A
Expected result: Modifier.Node has an onDestroy callback that is executed when the modifier is disposed.
Actual result: Modifier.Node does not have an onDestroy callback.