Zoltan Demant09/22/2023, 6:16 AM
sticking around a lil too long after being dismissed, and interactions being ignored in the in meantime?
ascii09/22/2023, 6:30 AM
Zoltan Demant09/22/2023, 7:55 AM
ascii09/22/2023, 8:55 AM
is called. This lambda would usually have your sheet hiding logic, e.g. setting a state variable to
. Tapping on the scrim immediately calls it (only if scrim color
); thus content "behind" the sheet can also be interacted with immediately, because sheet is removed from the composition. Dismissing by pressing back or swiping down plays out an animation first, and then calls
. Coroutines & iOC may have their own overhead that brings out delays. However, I wouldn't say it lasts for 2s; that's way too long. In my case it's a few hundred milliseconds. See for yourself: https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:compose/[…]kotlin/androidx/compose/material3/ModalBottomSheet.android.kt
Zoltan Demant09/22/2023, 9:07 AM
The way it's set up right now is that the bottom sheet window consumes all touch events (?), so it has to be removed from compThis sounds like the underlying issue. Agreed about it not being 2s, however seems to be long enough that my first touch event after dismissing it is ignored almost everytime.
Tapping on the scrim immediately calls it (only if scrim colorIf I understand you correctly, in this case the sheet will simply disappear without any animation?); thus content "behind" the sheet can also be interacted with immediately, because sheet is removed from the composition.
ascii09/22/2023, 9:14 AM
is set to
, and that function does the animate + invokeOnCompletion thing
Zoltan Demant09/22/2023, 9:27 AM
block, basically removing it when the sheet is dismissing or very close to fully hidden?