fix selecting tracks in tracklist

This commit is contained in:
Violet Caulfield
2025-01-16 06:45:19 -06:00
parent e9e0cf312b
commit 1438fb6ab3
4 changed files with 4 additions and 6 deletions

View File

@@ -14,7 +14,7 @@ import { useSafeAreaFrame } from "react-native-safe-area-context";
interface TrackProps {
track: BaseItemDto;
tracklist: BaseItemDto[];
index: number;
index: number | undefined;
showArtwork?: boolean | undefined;
onPress?: () => void | undefined
}
@@ -29,7 +29,7 @@ export default function Track({
} : {
track: BaseItemDto,
tracklist: BaseItemDto[],
index: number,
index?: number | undefined,
queueName?: string | undefined,
showArtwork?: boolean | undefined,
onPress?: () => void | undefined

View File

@@ -29,7 +29,6 @@ export default function Tracks({ navigation }: TracksProps) : React.JSX.Element
showArtwork
track={track}
tracklist={tracks?.slice(index, index + 50) ?? []}
index={index}
queueName="Favorite Tracks"
/>

View File

@@ -2,7 +2,7 @@ import { BaseItemDto } from "@jellyfin/sdk/lib/generated-client/models";
export interface QueueMutation {
track: BaseItemDto;
index: number;
index?: number | undefined;
tracklist: BaseItemDto[];
queueName: string;
}

View File

@@ -4,8 +4,7 @@ import { storage } from "../constants/storage";
import { MMKVStorageKeys } from "../enums/mmkv-storage-keys";
import { findPlayQueueIndexStart } from "./helpers/index";
import TrackPlayer, { Event, Progress, State, usePlaybackState, useProgress, useTrackPlayerEvents } from "react-native-track-player";
import _, { isNumber, isUndefined } from "lodash";
import { buildNewQueue } from "./helpers/queue";
import _, { isUndefined } from "lodash";
import { useApiClientContext } from "../components/jellyfin-api-provider";
import { getPlaystateApi } from "@jellyfin/sdk/lib/utils/api";
import { handlePlaybackProgressUpdated, handlePlaybackState } from "./handlers";