Bottom sheet: initial state must be Hidden else there is no animation when opening the bottom sheet.

This commit is contained in:
Benoit Marty
2026-06-19 09:19:04 +02:00
parent 33e2f72792
commit 82c6167441
17 changed files with 17 additions and 17 deletions
@@ -111,7 +111,7 @@ fun ActionListView(
modifier: Modifier = Modifier,
) {
val sheetState = rememberBottomSheetState(
initialValue = SheetValue.Expanded,
initialValue = SheetValue.Hidden,
)
val coroutineScope = rememberCoroutineScope()
val targetItem = (state.target as? ActionListState.Target.Success)?.event
@@ -45,7 +45,7 @@ fun ResolveVerifiedUserSendFailureView(
modifier: Modifier = Modifier,
) {
val sheetState = rememberBottomSheetState(
initialValue = SheetValue.Expanded,
initialValue = SheetValue.Hidden,
enabledValues = setOf(SheetValue.Hidden, SheetValue.Expanded),
)
var showSheet by remember { mutableStateOf(false) }
@@ -74,7 +74,7 @@ internal fun AttachmentsBottomSheet(
ModalBottomSheet(
modifier = modifier,
sheetState = rememberBottomSheetState(
initialValue = SheetValue.Expanded,
initialValue = SheetValue.Hidden,
enabledValues = setOf(SheetValue.Hidden, SheetValue.Expanded),
),
onDismissRequest = { isVisible = false },
@@ -32,7 +32,7 @@ fun CustomReactionBottomSheet(
modifier: Modifier = Modifier,
) {
val sheetState = rememberBottomSheetState(
initialValue = SheetValue.Expanded,
initialValue = SheetValue.Hidden,
)
val coroutineScope = rememberCoroutineScope()
val target = state.target as? CustomReactionState.Target.Success
@@ -46,7 +46,7 @@ internal fun ReadReceiptBottomSheet(
val isVisible = state.selectedEvent != null
val sheetState = rememberBottomSheetState(
initialValue = SheetValue.Expanded,
initialValue = SheetValue.Hidden,
)
val coroutineScope = rememberCoroutineScope()
if (isVisible) {