fix duplicate songs showing as playing

made playing icon in line with text (doesn't work well with scaling)
This commit is contained in:
austinried
2021-08-10 17:33:07 +09:00
parent 2c0fdfed4d
commit ea45678733
6 changed files with 42 additions and 15 deletions

View File

@@ -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 { useSetQueue } from '@app/hooks/trackplayer'
import { useIsPlaying, 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,6 +45,7 @@ const TopSongs = React.memo<{
artistId: string
}>(({ songs, name, artistId }) => {
const setQueue = useSetQueue()
const isPlaying = useIsPlaying()
return (
<>
@@ -53,6 +54,7 @@ const TopSongs = React.memo<{
<ListItem
key={i}
item={s}
isPlaying={() => isPlaying(artistId, i)}
showArt={true}
subtitle={s.album}
onPress={() => setQueue(songs, name, 'artist', artistId, i)}