From 071d670c6d87605e7f9bee3f8a4c44408b06e3c5 Mon Sep 17 00:00:00 2001 From: Alex Baker Date: Sat, 9 Aug 2025 10:11:42 -0500 Subject: [PATCH] Attempt to fix crash in menu search bar --- .../kotlin/org/tasks/compose/drawer/TaskListDrawer.kt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/kmp/src/commonMain/kotlin/org/tasks/compose/drawer/TaskListDrawer.kt b/kmp/src/commonMain/kotlin/org/tasks/compose/drawer/TaskListDrawer.kt index d6f7a4f92..4749ca38b 100644 --- a/kmp/src/commonMain/kotlin/org/tasks/compose/drawer/TaskListDrawer.kt +++ b/kmp/src/commonMain/kotlin/org/tasks/compose/drawer/TaskListDrawer.kt @@ -94,7 +94,11 @@ fun TaskListDrawer( BottomAppBar( modifier = Modifier .layout { measurable, constraints -> - val placeable = measurable.measure(constraints) + val safeConstraints = constraints.copy( + minHeight = constraints.minHeight.coerceAtLeast(0), + maxHeight = constraints.maxHeight.coerceAtLeast(0) + ) + val placeable = measurable.measure(safeConstraints) bottomAppBarScrollBehavior.state.heightOffsetLimit = -placeable.height.toFloat() val height =