Fixed
Status Update
Comments
il...@google.com <il...@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
il...@google.com <il...@google.com> #3
The following release(s) address this bug:
androidx.compose.runtime:runtime:1.3.0
mi...@gmail.com <mi...@gmail.com> #4
This is amazing. Thank you very much for moving it to the Activity Navigator.
Description
Android Studio 3.3 RC 3
Build #AI-182.5107.16.33.5183351, built on December 14, 2018
JRE: 1.8.0_152-release-1248-b01 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Windows 10 10.0
Navigation Library version used: 1.0.0-alpha09
Repro steps:
1. Create two activities and two fragments
2. Set home fragments for both activities
3. Set up navigation between these two activities as described in the documentation
3. Configure animations in navigation graph for navigation between two activities to a desired animation/transition
app:enterAnim
app:exitAnim
app:popEnterAnim
4. Test the app
Expected result:
- Override Activities default transition with transition specified in navigation graph for enter, exit and pop animations.
Achieved result:
- Animation for enter and exit successfully changed
- Animation for pop actions is still the default activity animation
Additional notes:
Using function overridePendingTransition() works just fine.