Open ParticleCore opened 3 years ago
A bit more context here: https://issuetracker.google.com/176503896
In general there are basically two ways to do this:
initialKey
passed to Pager
However if you are using Room, in both cases you need a way to map the desired starting item to the position in Room which unfortunately is quite hard until we can figure out how to support item-keyed paging source in Room. The easiest way is probably to implement a custom item-keyed PagingSource that just queries from Room, but allows you to use the same key across your app + paging integration.
Has there been any improvement done around this issue, or is the same dilemma present in the current versions of the Paging library?
Room does not support item keyed paging yet - they've moved to paging3 but still have some ways to go to get to item keyed.
SQLDelight allows a key map argument for their paging integration which supports item keyed, but yigit will hunt me down for telling you this :)
Any update on this?
Are there any plans to provide a sample showing how to load a
PagingSource
from the Room'sDao
at a certain item position?Example:
I looked for something like this and I did not find anything.
Thanks for making these great components!