I'm using `LazyLayoutPrefetchState` in a custom `L...
# compose
s
I'm using
LazyLayoutPrefetchState
in a custom
LazyLayout
to prefetch the previous page and the next one (e.g. in "A, B, C, D, E", I prefetch A and C). However, pages can be swapped (e.g. "A, B, E, C, D"). How can I handle such thing? How can I tell the
Prefetcher
the item at index 2 has changed? Is
LazyLayoutItemProvider
involved at all?
Ok, cancelling the
PrefetchHandle
whenever a reordering occurs seems to do the trick. But would love to know more about it
a
Agree, it could be hard to handle properly. the prefetching is working with indexes and doesn’t really handle the case when the key for the given index changes after the item was prefetched. Can you please file a bug for us to make it simpler to handle? Thanks
a
thanks!