From be745484c552a2f7507caa16297cae7fd366a0ca Mon Sep 17 00:00:00 2001 From: MM20 <15646950+MM2-0@users.noreply.github.com> Date: Sun, 31 May 2026 17:06:44 +0200 Subject: [PATCH] fix empty bottom sheets closing themselves --- .../de/mm20/launcher2/ui/component/DismissableBottomSheet.kt | 2 +- .../mm20/launcher2/ui/launcher/sheets/ConfigureWidgetSheet.kt | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/app/ui/src/main/java/de/mm20/launcher2/ui/component/DismissableBottomSheet.kt b/app/ui/src/main/java/de/mm20/launcher2/ui/component/DismissableBottomSheet.kt index 9aafee8a6..3309df490 100644 --- a/app/ui/src/main/java/de/mm20/launcher2/ui/component/DismissableBottomSheet.kt +++ b/app/ui/src/main/java/de/mm20/launcher2/ui/component/DismissableBottomSheet.kt @@ -235,7 +235,7 @@ fun DismissableBottomSheet( .widthIn(max = BottomSheetDefaults.SheetMaxWidth) .align(Alignment.BottomCenter) .wrapContentHeight() - .heightIn(max = maxHeight) + .heightIn(min = 96.dp, max = maxHeight) .graphicsLayer { translationY = draggableState.offset.coerceAtMost(0f) + sheetHeight } diff --git a/app/ui/src/main/java/de/mm20/launcher2/ui/launcher/sheets/ConfigureWidgetSheet.kt b/app/ui/src/main/java/de/mm20/launcher2/ui/launcher/sheets/ConfigureWidgetSheet.kt index 44b62f6dc..345229e26 100644 --- a/app/ui/src/main/java/de/mm20/launcher2/ui/launcher/sheets/ConfigureWidgetSheet.kt +++ b/app/ui/src/main/java/de/mm20/launcher2/ui/launcher/sheets/ConfigureWidgetSheet.kt @@ -13,7 +13,6 @@ import androidx.appcompat.app.AppCompatActivity import androidx.browser.customtabs.CustomTabColorSchemeParams import androidx.browser.customtabs.CustomTabsIntent import androidx.compose.animation.AnimatedContent -import androidx.compose.animation.AnimatedVisibility import androidx.compose.animation.animateContentSize import androidx.compose.animation.core.animateDpAsState import androidx.compose.foundation.background @@ -866,7 +865,7 @@ fun ColumnScope.ConfigureCalendarWidget( calendars?.any { it.types.contains(CalendarListType.Tasks) } == true } - AnimatedVisibility(hasTasks) { + if (hasTasks) { OutlinedCard { Column( modifier = Modifier.fillMaxWidth()