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])