refactor: 将 player.ts 里面的Mode.PLAYLIST改为 Mode.TrackList

This commit is contained in:
qier222 2022-04-16 21:35:37 +08:00
parent 7b6579e068
commit 0061a66124
No known key found for this signature in database
GPG key ID: 9C85007ED905F14D
6 changed files with 22 additions and 12 deletions

View file

@ -32,10 +32,15 @@ const PlayButton = ({
const playerSnapshot = useSnapshot(player)
const isThisPlaylistPlaying = useMemo(
() =>
playerSnapshot.mode === PlayerMode.PLAYLIST &&
playerSnapshot.mode === PlayerMode.TrackList &&
playerSnapshot.trackListSource?.type === TrackListSourceType.PLAYLIST &&
playerSnapshot.trackListSource?.id === playlist?.id,
[playerSnapshot.trackListSource, playlist?.id]
[
playerSnapshot.mode,
playerSnapshot.trackListSource?.id,
playerSnapshot.trackListSource?.type,
playlist?.id,
]
)
const wrappedHandlePlay = () => {