commit | c9e44ca7a5c670292bcf34bcbc4e85c9bfbc3c89 | [log] [tgz] |
---|---|---|
author | Amaury Medeiros <amaurym@google.com> | Fri Jan 29 18:05:26 2021 +0000 |
committer | Amaury Medeiros <amaurym@google.com> | Fri Jan 29 18:05:26 2021 +0000 |
tree | abe2aa10d5cfb4850ff3c6fa2c231ee1fdfde7ed | |
parent | aa5fab29a951a8f6f53b826377d0b94760d16616 [diff] |
Remove early return from updateInitialAndTargetValue This is a temporary workaround while we don't figure out why the Animation Preview does not work properly when we have the early return in place. Bug: 178811102 Test: Checked on Android Studio Compose Animation Preview Change-Id: Ic246c80a977685a62242d42905d15c25e668228b
diff --git a/compose/animation/animation-core/src/commonMain/kotlin/androidx/compose/animation/core/Transition.kt b/compose/animation/animation-core/src/commonMain/kotlin/androidx/compose/animation/core/Transition.kt index fb21aa8..21fff8f4 100644 --- a/compose/animation/animation-core/src/commonMain/kotlin/androidx/compose/animation/core/Transition.kt +++ b/compose/animation/animation-core/src/commonMain/kotlin/androidx/compose/animation/core/Transition.kt
@@ -425,11 +425,12 @@ } @PublishedApi + @Suppress("ControlFlowWithEmptyBody") // This gets called *during* composition internal fun updateInitialAndTargetValue(initialValue: T, targetValue: T) { this.targetValue = targetValue if (animation.initialValue == initialValue && animation.targetValue == targetValue) { - return + // TODO(b/178811102): we should be able to return early here. } updateAnimation(initialValue) }