From cb4f1c6acdfd1bfe0ec303e2406dbd6d276a3f25 Mon Sep 17 00:00:00 2001 From: Violet Caulfield Date: Fri, 15 Aug 2025 22:27:57 -0500 Subject: [PATCH] additional context menu actuation fix maestro --- src/components/Artist/albums.tsx | 7 +++++++ src/components/Artist/similar.tsx | 7 +++++++ src/screens/Library/index.tsx | 2 -- src/screens/Tabs/index.tsx | 2 ++ 4 files changed, 16 insertions(+), 2 deletions(-) diff --git a/src/components/Artist/albums.tsx b/src/components/Artist/albums.tsx index a72a78b7..7c4f82ee 100644 --- a/src/components/Artist/albums.tsx +++ b/src/components/Artist/albums.tsx @@ -8,6 +8,7 @@ import Animated, { useAnimatedScrollHandler } from 'react-native-reanimated' import { ActivityIndicator } from 'react-native' import { useSafeAreaFrame } from 'react-native-safe-area-context' import { getToken } from 'tamagui' +import navigationRef from '../../../navigation' export default function Albums({ route, navigation, @@ -77,6 +78,12 @@ export default function Albums({ album, }) }} + onLongPress={() => { + navigationRef.navigate('Context', { + item: album, + navigation, + }) + }} /> )} onScroll={scrollHandler} diff --git a/src/components/Artist/similar.tsx b/src/components/Artist/similar.tsx index b47a9968..732c6bdb 100644 --- a/src/components/Artist/similar.tsx +++ b/src/components/Artist/similar.tsx @@ -6,6 +6,7 @@ import { Text } from '../Global/helpers/text' import { useArtistContext } from '../../providers/Artist' import Animated, { useAnimatedScrollHandler } from 'react-native-reanimated' import { ActivityIndicator } from 'react-native' +import navigationRef from '../../../navigation' export default function SimilarArtists(): React.JSX.Element { const navigation = useNavigation>() @@ -35,6 +36,12 @@ export default function SimilarArtists(): React.JSX.Element { artist, }) }} + onLongPress={() => { + navigationRef.navigate('Context', { + item: artist, + navigation, + }) + }} /> )} ListEmptyComponent={ diff --git a/src/screens/Library/index.tsx b/src/screens/Library/index.tsx index 10ea8e2a..53f959de 100644 --- a/src/screens/Library/index.tsx +++ b/src/screens/Library/index.tsx @@ -49,7 +49,6 @@ export default function LibraryStack({ route, navigation }: LibraryTabProps): Re name='Album' component={AlbumScreen} options={({ route }) => ({ - headerShown: false, title: route.params.album.Name ?? 'Untitled Album', headerTitleStyle: { color: theme.background.val, @@ -61,7 +60,6 @@ export default function LibraryStack({ route, navigation }: LibraryTabProps): Re name='Playlist' component={PlaylistScreen} options={({ route }) => ({ - headerShown: false, title: route.params.playlist.Name ?? 'Untitled Playlist', headerTitleStyle: { color: theme.background.val, diff --git a/src/screens/Tabs/index.tsx b/src/screens/Tabs/index.tsx index 007c7b0a..260c50b6 100644 --- a/src/screens/Tabs/index.tsx +++ b/src/screens/Tabs/index.tsx @@ -12,6 +12,7 @@ import LibraryStack from '../Library' import InternetConnectionWatcher from '../../components/Network/internetConnectionWatcher' import TabParamList from './types' import { TabProps } from '../types' +import { Platform } from 'react-native' const Tab = createBottomTabNavigator() @@ -21,6 +22,7 @@ export default function Tabs({ route, navigation }: TabProps): React.JSX.Element return (