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:
@@ -1,7 +1,7 @@
|
||||
import GradientScrollView from '@app/components/GradientScrollView'
|
||||
import ListItem from '@app/components/ListItem'
|
||||
import NowPlayingBar from '@app/components/NowPlayingBar'
|
||||
import { mapTrackExtToSong, useIsPlaying, useSkipTo } from '@app/hooks/trackplayer'
|
||||
import { mapTrackExtToSong, useSkipTo } from '@app/hooks/trackplayer'
|
||||
import { useStore } from '@app/state/store'
|
||||
import { selectTrackPlayer } from '@app/state/trackplayer'
|
||||
import React from 'react'
|
||||
@@ -10,7 +10,6 @@ import { StyleSheet, View } from 'react-native'
|
||||
const NowPlayingQueue = React.memo<{}>(() => {
|
||||
const queue = useStore(selectTrackPlayer.queue)
|
||||
const skipTo = useSkipTo()
|
||||
const isPlaying = useIsPlaying()
|
||||
|
||||
return (
|
||||
<View style={styles.outerContainer}>
|
||||
@@ -20,7 +19,7 @@ const NowPlayingQueue = React.memo<{}>(() => {
|
||||
<ListItem
|
||||
key={i}
|
||||
item={song}
|
||||
isPlaying={() => isPlaying(undefined, i)}
|
||||
queueId={i}
|
||||
onPress={() => skipTo(i)}
|
||||
showArt={true}
|
||||
subtitle={`${song.artist} • ${song.album}`}
|
||||
|
||||
Reference in New Issue
Block a user