Fix issue where navigation in the context menu nested in the player didn't work
This commit is contained in:
Violet Caulfield
2025-11-22 08:27:46 -06:00
parent 02eec990f4
commit aabcc816be

View File

@@ -8,6 +8,9 @@ export function goToAlbumFromContextSheet(album: BaseItemDto | undefined) {
// Pop Context Sheet
navigationRef.dispatch(StackActions.pop())
if (navigationRef.getCurrentRoute()?.name === 'PlayerScreen')
navigationRef.dispatch(StackActions.pop()) // Dismiss player modal
const state = navigationRef.getRootState()
const tabsRoute = state.routes.find((r) => r.name === 'Tabs')
@@ -40,6 +43,9 @@ export function goToArtistFromContextSheet(artist: BaseItemDto | undefined) {
// Pop Context Sheet
navigationRef.dispatch(StackActions.pop())
if (navigationRef.getCurrentRoute()?.name === 'PlayerScreen')
navigationRef.dispatch(StackActions.pop()) // Dismiss player modal
const state = navigationRef.getRootState()
const tabsRoute = state.routes.find((r) => r.name === 'Tabs')