Remove unused code from BottomSheet

This commit is contained in:
vfsfitvnm
2022-07-23 13:05:58 +02:00
parent 5cfc467dd3
commit 561e36e1f6

View File

@@ -4,7 +4,6 @@ import androidx.activity.compose.BackHandler
import androidx.compose.animation.core.* import androidx.compose.animation.core.*
import androidx.compose.foundation.clickable import androidx.compose.foundation.clickable
import androidx.compose.foundation.gestures.DraggableState import androidx.compose.foundation.gestures.DraggableState
import androidx.compose.foundation.gestures.detectTapGestures
import androidx.compose.foundation.gestures.detectVerticalDragGestures import androidx.compose.foundation.gestures.detectVerticalDragGestures
import androidx.compose.foundation.interaction.MutableInteractionSource import androidx.compose.foundation.interaction.MutableInteractionSource
import androidx.compose.foundation.layout.* import androidx.compose.foundation.layout.*
@@ -80,13 +79,6 @@ fun BottomSheet(
} }
) )
} }
.pointerInput(state) {
if (!state.isRunning && state.isCollapsed) {
detectTapGestures {
state.expand()
}
}
}
.fillMaxSize() .fillMaxSize()
) { ) {
if (!state.isCollapsed) { if (!state.isCollapsed) {
@@ -128,10 +120,6 @@ class BottomSheetState(
val value by animatable.asState() val value by animatable.asState()
val isRunning by derivedStateOf {
animatable.isRunning
}
val isCollapsed by derivedStateOf { val isCollapsed by derivedStateOf {
value == animatable.lowerBound value == animatable.lowerBound
} }