Skip to content

Commit a69e379

Browse files
committed
Use detent state for modal sheet teardown
1 parent 9f49301 commit a69e379

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

  • composeunstyled-modal-bottom-sheet/src/commonMain/kotlin/com/composeunstyled

composeunstyled-modal-bottom-sheet/src/commonMain/kotlin/com/composeunstyled/ModalBottomSheet.kt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -256,13 +256,11 @@ fun UnstyledModalBottomSheet(
256256
state.bottomSheetState.isIdle,
257257
state.bottomSheetState.currentDetent,
258258
state.bottomSheetState.targetDetent,
259-
state.offset,
260259
) {
261260
if (
262261
state.bottomSheetState.isIdle &&
263262
state.bottomSheetState.currentDetent == SheetDetent.Hidden &&
264-
state.bottomSheetState.targetDetent == SheetDetent.Hidden &&
265-
state.offset <= 0.5f
263+
state.bottomSheetState.targetDetent == SheetDetent.Hidden
266264
) {
267265
completeDismiss()
268266
}

0 commit comments

Comments
 (0)