mirror of
https://github.com/Jellify-Music/App.git
synced 2026-01-06 02:50:30 -06:00
fix selecting tracks in tracklist
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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"
|
||||
/>
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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";
|
||||
|
||||
Reference in New Issue
Block a user