From 02994de29ce451bd7d4a2cd1d787497f558b52c4 Mon Sep 17 00:00:00 2001 From: QQ Date: Tue, 17 Nov 2026 08:33:37 +0800 Subject: [PATCH] Import apps/android/src/ui/motion.ts --- apps/android/src/ui/motion.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/android/src/ui/motion.ts b/apps/android/src/ui/motion.ts index 6758b78..cf1ffbe 100644 --- a/apps/android/src/ui/motion.ts +++ b/apps/android/src/ui/motion.ts @@ -85,13 +85,15 @@ export function sheetPhaseDuration(phase: SheetPhase, reduceMotion: boolean): nu } /** - * Pure phase transition. Closing is never skipped: showing again while closing + * Pure phase transition. Closing is never skipped unless another sheet + * supersedes it during a direct handoff; showing again while closing * re-enters `opening` so the animation continues from its current frame. */ -export function nextSheetPhase(phase: SheetPhase, visible: boolean): SheetPhase { +export function nextSheetPhase(phase: SheetPhase, visible: boolean, superseded = false): SheetPhase { if (visible) { return phase === 'unmounted' || phase === 'closing' ? 'opening' : phase } + if (superseded) return 'unmounted' return phase === 'unmounted' ? 'unmounted' : 'closing' }