mirror of
https://github.com/austinried/subtracks.git
synced 2026-02-10 06:52:43 +01:00
fix duplicate songs showing as playing
made playing icon in line with text (doesn't work well with scaling)
This commit is contained in:
@@ -243,6 +243,18 @@ export const useSetQueue = () => {
|
||||
})
|
||||
}
|
||||
|
||||
export const useIsPlaying = () => {
|
||||
const queueContextId = useStore(selectTrackPlayer.queueContextId)
|
||||
const currentTrackIdx = useStore(selectTrackPlayer.currentTrackIdx)
|
||||
|
||||
return (contextId: string | undefined, track: number) => {
|
||||
if (contextId === undefined) {
|
||||
return track === currentTrackIdx
|
||||
}
|
||||
return contextId === queueContextId && track === currentTrackIdx
|
||||
}
|
||||
}
|
||||
|
||||
function mapSongToTrack(song: Song, coverArtUri: (coverArt?: string) => string | undefined): TrackExt {
|
||||
return {
|
||||
id: song.id,
|
||||
|
||||
Reference in New Issue
Block a user