diff --git a/gradle/compose.versions.toml b/gradle/compose.versions.toml index b37960e0a..cd0e14211 100644 --- a/gradle/compose.versions.toml +++ b/gradle/compose.versions.toml @@ -1,6 +1,7 @@ [versions] compiler = "1.5.11" -compose-bom = "2024.02.00-alpha02" +# 2024.04.00-alpha01 has several bugs with the new animateItem() modifier +compose-bom = "2024.03.00-alpha02" accompanist = "0.35.0-alpha" [libraries] diff --git a/presentation-core/src/main/java/tachiyomi/presentation/core/components/AdaptiveSheet.kt b/presentation-core/src/main/java/tachiyomi/presentation/core/components/AdaptiveSheet.kt index 568332ca7..5ee802edc 100644 --- a/presentation-core/src/main/java/tachiyomi/presentation/core/components/AdaptiveSheet.kt +++ b/presentation-core/src/main/java/tachiyomi/presentation/core/components/AdaptiveSheet.kt @@ -122,7 +122,7 @@ fun AdaptiveSheet( ) } val internalOnDismissRequest = { - if (anchoredDraggableState.currentValue == 0) { + if (anchoredDraggableState.settledValue == 0) { scope.launch { anchoredDraggableState.animateTo(1) } } } @@ -192,7 +192,7 @@ fun AdaptiveSheet( LaunchedEffect(anchoredDraggableState) { scope.launch { anchoredDraggableState.animateTo(0) } - snapshotFlow { anchoredDraggableState.currentValue } + snapshotFlow { anchoredDraggableState.settledValue } .drop(1) .filter { it == 1 } .collectLatest {