Fixed
Status Update
Comments
cl...@google.com <cl...@google.com> #2
Yigit, do you have time to fix it?
reemission of the same liveData is racy
reemission of the same liveData is racy
to...@marginalen.se <to...@marginalen.se> #3
yea i'll take it.
cl...@google.com <cl...@google.com> #4
Thanks for the detailed analysis. This may not be an issue anymore since we've started using Main.immediate there but I' not sure; I'll try to create a test case.
Description
Component used: androidx.paging:paging-compose
Version used: 3.2.1
Devices/Android versions reproduced on: Pixel 6 Pro API 32 emulator
That last line shouldn't pass. Both cachedPageEvent that's in the
empty
the API call andfrom(emptyList())
should be marked as not loading. Ian mentioned the difference was in thefrom
method, but not theempty
one.For what it's worth, I would consider this a breaking API change. In places where people were relying on
empty
to be an initial loading state to show a progress indicator, it won't if this bug is fixed.As an alternative, maybe expose a
PagingData.loading()
which does whatempty
does now.