Skip to content

Commit bc92bb0

Browse files
committed
fix(nav3): dismiss sheet animation when navigator.hide() is called
hide() was calling popAll() which cleared the inner backstack without triggering the sheet dismiss animation. Changed to call onRootReached() which fires the sheetDismissDispatcher chain to properly animate out. Signed-off-by: Brandon McAnsh <git@bmcreations.dev>
1 parent 85d16fa commit bc92bb0

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

ui/navigation/src/main/kotlin/com/getcode/navigation/core/CodeNavigator.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ data class CodeNavigator(
207207
}
208208

209209
/** Hide/dismiss a sheet (pops the current route). */
210-
fun hide() = popAll()
210+
fun hide() = onRootReached()
211211

212212
/** Replace the current route with a new one. */
213213
fun replace(route: NavKey) = navigate(route, NavOptions(popUpTo = NavOptions.PopUpTo.PopLast))

0 commit comments

Comments
 (0)