Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 961d2b4e authored by Helen Qin's avatar Helen Qin Committed by Android (Google) Code Review
Browse files

Merge "Short term solution for the in-animation-dismissal-freeze bug." into main

parents c2f90780 2f891f63
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -60,12 +60,13 @@ fun ModalBottomSheet(
        sheetContent = sheetContent,
        sheetShape = EntryShape.TopRoundedCorner,
    ) {}
    LaunchedEffect(state.currentValue) {
    LaunchedEffect(state.currentValue, state.targetValue) {
        if (state.currentValue == ModalBottomSheetValue.Hidden) {
            if (isInitialRender) {
                onInitialRenderComplete()
                scope.launch { state.show() }
            } else {
            } else if (state.targetValue == ModalBottomSheetValue.Hidden) {
                // Only dismiss ui when the motion is downwards
                onDismiss()
            }
        }