Fixed
Status Update
Comments
du...@google.com <du...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-main
commit 4945dfa31180f343697de5810b99ec80a48dc386
Author: Andrei Shikov <ashikov@google.com>
Date: Mon Jun 20 16:09:06 2022
Prevent removing derived state from composition when it is read in other scopes
Derived state observations were previously unconditionally removed from the recompose scope and composition together, which broke other scopes which might be still observing derived state.
This change only removes derived state instances if it is no longer observed by other scopes.
Fixes: 236618362
Test: CompositionAndDerivedStateTests#observingDerivedStateInMultipleScopes
Change-Id: I92e7c8702efecb33bea3ea3effe9ec47e2a6ae5b
M compose/runtime/runtime/src/commonMain/kotlin/androidx/compose/runtime/Composition.kt
M compose/runtime/runtime/src/commonTest/kotlin/androidx/compose/runtime/CompositionAndDerivedStateTests.kt
https://android-review.googlesource.com/2131915
Branch: androidx-main
commit 4945dfa31180f343697de5810b99ec80a48dc386
Author: Andrei Shikov <ashikov@google.com>
Date: Mon Jun 20 16:09:06 2022
Prevent removing derived state from composition when it is read in other scopes
Derived state observations were previously unconditionally removed from the recompose scope and composition together, which broke other scopes which might be still observing derived state.
This change only removes derived state instances if it is no longer observed by other scopes.
Fixes: 236618362
Test: CompositionAndDerivedStateTests#observingDerivedStateInMultipleScopes
Change-Id: I92e7c8702efecb33bea3ea3effe9ec47e2a6ae5b
M compose/runtime/runtime/src/commonMain/kotlin/androidx/compose/runtime/Composition.kt
M compose/runtime/runtime/src/commonTest/kotlin/androidx/compose/runtime/CompositionAndDerivedStateTests.kt
du...@google.com <du...@google.com>
ta...@gmail.com <ta...@gmail.com> #3
The following release(s) address this bug:
androidx.compose.runtime:runtime:1.3.0
ap...@google.com <ap...@google.com> #4
Project: platform/frameworks/support
Branch: androidx-master-dev
commit 3bafac069a856b0f6f226f88bac69b1fe95bebaf
Author: Dustin Lam <dustinlam@google.com>
Date: Mon Nov 23 23:14:12 2020
Allow remote to send NotLoading.Incomplete via LoadStateUpdate
Due to remote loads being completely async with local insert, it's no
longer possible to guarantee that local insert will finish after remote
load. This leads to situations where it's possible for remote load state
to get stuck in "Loading" state forever.
This change enables RemoteMediator to fire off LoadState events to
update to NotLoading.Incomplete, but comes with the caveat that
CombinedLoadState.mediator.refresh is now no longer
sufficient to check for displaying loadstate in UI as it may set
NotLoading before PagingSource.load finishes (and presents to the UI).
In previous versions this was worked around by resetting the Mediator
loadstate on new generations, but this is no longer accurate since those
calls don't necessarily get canceled.
Fixes: 173717820
Test: ./gradlew paging:paging-common:test
Change-Id: I2f1236fcb37777d059de3a53bbcd2a7aa038d479
M paging/common/src/main/kotlin/androidx/paging/PageEvent.kt
M paging/common/src/test/kotlin/androidx/paging/PageFetcherSnapshotTest.kt
M paging/common/src/test/kotlin/androidx/paging/RemoteMediatorAccessorTest.kt
https://android-review.googlesource.com/1509156
Branch: androidx-master-dev
commit 3bafac069a856b0f6f226f88bac69b1fe95bebaf
Author: Dustin Lam <dustinlam@google.com>
Date: Mon Nov 23 23:14:12 2020
Allow remote to send NotLoading.Incomplete via LoadStateUpdate
Due to remote loads being completely async with local insert, it's no
longer possible to guarantee that local insert will finish after remote
load. This leads to situations where it's possible for remote load state
to get stuck in "Loading" state forever.
This change enables RemoteMediator to fire off LoadState events to
update to NotLoading.Incomplete, but comes with the caveat that
CombinedLoadState.mediator.refresh is now no longer
sufficient to check for displaying loadstate in UI as it may set
NotLoading before PagingSource.load finishes (and presents to the UI).
In previous versions this was worked around by resetting the Mediator
loadstate on new generations, but this is no longer accurate since those
calls don't necessarily get canceled.
Fixes: 173717820
Test: ./gradlew paging:paging-common:test
Change-Id: I2f1236fcb37777d059de3a53bbcd2a7aa038d479
M paging/common/src/main/kotlin/androidx/paging/PageEvent.kt
M paging/common/src/test/kotlin/androidx/paging/PageFetcherSnapshotTest.kt
M paging/common/src/test/kotlin/androidx/paging/RemoteMediatorAccessorTest.kt
Description
Version used: 3.0.0-alpha08 or 3.0.0-alpha09
Devices/Android versions reproduced on: Samsung Galaxy S8 / Android 9
Starting with version 3.0.0-alpha08 of the Paging library, the MediatorResult.Success(false) value returned from a RemoteMediator.load(LoadType.REFRESH, state) call doesn’t trigger a RemoteMediator.load(LoadType.APPEND, state) call and doesn’t update PagingDataAdapter.loadStateFlow to notify that the refresh state has changed from LoadState.Loading to LoadState.NotLoading.
This bug can be reproduced by means of the following project, if you’ve changed the version of the Paging library it uses so that it’s equal to 3.0.0-alpha08 or 3.0.0-alpha09: