mirror of
https://github.com/austinried/subtracks.git
synced 2026-02-10 15:02:42 +01:00
fix current idx not being set on toggle shuffle
switch to passing params instead of function
This commit is contained in:
@@ -5,7 +5,7 @@ import GradientScrollView from '@app/components/GradientScrollView'
|
||||
import Header from '@app/components/Header'
|
||||
import ListItem from '@app/components/ListItem'
|
||||
import { useArtistInfo } from '@app/hooks/music'
|
||||
import { useIsPlaying, useSetQueue } from '@app/hooks/trackplayer'
|
||||
import { useSetQueue } from '@app/hooks/trackplayer'
|
||||
import { Album, Song } from '@app/models/music'
|
||||
import colors from '@app/styles/colors'
|
||||
import font from '@app/styles/font'
|
||||
@@ -45,7 +45,6 @@ const TopSongs = React.memo<{
|
||||
artistId: string
|
||||
}>(({ songs, name, artistId }) => {
|
||||
const setQueue = useSetQueue()
|
||||
const isPlaying = useIsPlaying()
|
||||
|
||||
return (
|
||||
<>
|
||||
@@ -54,7 +53,8 @@ const TopSongs = React.memo<{
|
||||
<ListItem
|
||||
key={i}
|
||||
item={s}
|
||||
isPlaying={() => isPlaying(artistId, i)}
|
||||
contextId={artistId}
|
||||
queueId={i}
|
||||
showArt={true}
|
||||
subtitle={s.album}
|
||||
onPress={() => setQueue(songs, name, 'artist', artistId, i)}
|
||||
|
||||
Reference in New Issue
Block a user