set isClosing before cancel() to prevent content observer fighting dismiss
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -331,6 +331,9 @@ class BottomSheetView(
|
|||||||
|
|
||||||
fun dismiss() {
|
fun dismiss() {
|
||||||
val dialog = this.dialog ?: return
|
val dialog = this.dialog ?: return
|
||||||
|
// Mark as closing so the content observer doesn't fight the dismiss
|
||||||
|
// animation by calling updateLayout() mid-hide.
|
||||||
|
this.isClosing = true
|
||||||
// Temporarily make cancelable so cancel() works — cancel() gives the
|
// Temporarily make cancelable so cancel() works — cancel() gives the
|
||||||
// slide-out animation, while dismiss() does a plain fade.
|
// slide-out animation, while dismiss() does a plain fade.
|
||||||
dialog.setCancelable(true)
|
dialog.setCancelable(true)
|
||||||
|
|||||||
Reference in New Issue
Block a user