Fix bottom sheets auto closing
This commit is contained in:
parent
2412e37e20
commit
494a18ac97
@ -1,5 +1,6 @@
|
||||
package de.mm20.launcher2.ui.component
|
||||
|
||||
import android.util.Log
|
||||
import androidx.activity.compose.BackHandler
|
||||
import androidx.compose.animation.core.animateFloatAsState
|
||||
import androidx.compose.animation.core.exponentialDecay
|
||||
@ -107,8 +108,8 @@ fun BottomSheetDialog(
|
||||
}
|
||||
}
|
||||
|
||||
LaunchedEffect(draggableState.currentValue) {
|
||||
if (isOpenAnimationFinished && draggableState.currentValue == SwipeState.Dismiss) {
|
||||
LaunchedEffect(draggableState.settledValue) {
|
||||
if (isOpenAnimationFinished && draggableState.settledValue == SwipeState.Dismiss) {
|
||||
onDismissRequest()
|
||||
} else {
|
||||
isOpenAnimationFinished = true
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user