From eaec0c77d5a565d43d92d5d0165264c79e7d60c7 Mon Sep 17 00:00:00 2001 From: Joshua Higgins Date: Fri, 30 Oct 2026 14:21:09 -0400 Subject: [PATCH] fix(mobile): dismiss player when navigating to library --- apps/mobile/lib/app-navigation.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/apps/mobile/lib/app-navigation.ts b/apps/mobile/lib/app-navigation.ts index acdfef5..3b0f224 100644 --- a/apps/mobile/lib/app-navigation.ts +++ b/apps/mobile/lib/app-navigation.ts @@ -38,6 +38,13 @@ export function useAppNavigation() { const router = useRouter() const push = useCallback((path: string) => { + if (activeSegmentsRef.current.includes("player")) { + // Leave the root player modal before navigating into the library stack. + router.dismiss() + router.navigate(tabPath("library", path)) + return + } + router.push(tabPath(getActiveTabFromRef(), path)) }, [router])