diff --git a/components/Global/components/track.tsx b/components/Global/components/track.tsx index 48742dca..6d5ba8d4 100644 --- a/components/Global/components/track.tsx +++ b/components/Global/components/track.tsx @@ -26,14 +26,16 @@ export default function Track({ index, queueName, showArtwork, - onPress + onPress, + onLongPress, } : { track: BaseItemDto, tracklist: BaseItemDto[], index?: number | undefined, queueName?: string | undefined, showArtwork?: boolean | undefined, - onPress?: () => void | undefined + onPress?: () => void | undefined, + onLongPress?: () => void | undefined, }) : React.JSX.Element { const { width } = useSafeAreaFrame(); @@ -48,6 +50,13 @@ export default function Track({ { + if (onLongPress) { + onLongPress(); + } else { + + } + }} onPress={() => { if (onPress) { onPress(); diff --git a/components/Player/screens/index.tsx b/components/Player/screens/index.tsx index 068ce166..4cb344cd 100644 --- a/components/Player/screens/index.tsx +++ b/components/Player/screens/index.tsx @@ -100,17 +100,19 @@ export default function PlayerScreen({ navigation }: { navigation: NativeStackNa bold fontSize={"$6"} > - {nowPlaying?.title ?? "Untitled Track"} + {nowPlaying!.title ?? "Untitled Track"} { - navigation.goBack(); // Dismiss player modal - navigation.push("Artist", { - artist: nowPlaying!.item.ArtistItems![0], - }); + if (nowPlaying!.item.ArtistItems) { + navigation.goBack(); // Dismiss player modal + navigation.push("Artist", { + artist: nowPlaying!.item.ArtistItems![0], + }); + } }} > {nowPlaying.artist ?? "Unknown Artist"}