Skip to content

Commit

Permalink
Merge pull request #40 from AlexGladkov/fixes/modal-sheet-close-by-sw…
Browse files Browse the repository at this point in the history
…ipe-error

fix: bottom dialog close by swipe error
  • Loading branch information
AlexGladkov authored Apr 29, 2022
2 parents e9e0f15 + cd4863e commit 77d0641
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ internal fun BoxScope.BottomModalSheet(
}

Box(modifier = Modifier.fillMaxSize()) {
if (bundle.closeOnSwipe){
if (bundle.closeOnSwipe) {
modifier = modifier.swipeable(
state = swipeableState,
anchors = anchors,
Expand All @@ -89,7 +89,7 @@ internal fun BoxScope.BottomModalSheet(
}

LaunchedEffect(bundle.dialogState, swipeableState.offset.value) {
if (swipeableState.offset.value == viewHeight) {
if (swipeableState.offset.value == viewHeight && bundle.dialogState !is ModalDialogState.Close) {
modalController.setTopDialogState(ModalDialogState.Close())
}

Expand Down

0 comments on commit 77d0641

Please sign in to comment.