Skip to content

Commit

Permalink
avoid isVisible check
Browse files Browse the repository at this point in the history
  • Loading branch information
Rawa committed Jul 26, 2024
1 parent 31a2cca commit 47f9d12
Showing 1 changed file with 1 addition and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -554,13 +554,7 @@ private fun BottomSheets(
val scope = rememberCoroutineScope()
val onCloseBottomSheet: (animate: Boolean) -> Unit = { animate ->
if (animate) {
scope
.launch { sheetState.hide() }
.invokeOnCompletion {
if (!sheetState.isVisible) {
onHideBottomSheet()
}
}
scope.launch { sheetState.hide() }.invokeOnCompletion { onHideBottomSheet() }
} else {
onHideBottomSheet()
}
Expand Down

0 comments on commit 47f9d12

Please sign in to comment.