fix(mobile): dismiss player when navigating to library
This commit is contained in:
1 file changed
+7
@@ -38,6 +38,13 @@ export function useAppNavigation() {
|
|||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
|
|
||||||
const push = useCallback((path: string) => {
|
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.push(tabPath(getActiveTabFromRef(), path))
|
||||||
}, [router])
|
}, [router])
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user