From f859be51a562c7b598b339879960657ff80d92f8 Mon Sep 17 00:00:00 2001 From: austinried <4966622+austinried@users.noreply.github.com> Date: Tue, 20 Jul 2021 13:02:42 +0900 Subject: [PATCH] impl shuffle, controls are temp --- app/components/TrackPlayerState.tsx | 4 +- app/screens/AlbumView.tsx | 7 +- app/screens/ArtistView.tsx | 6 +- app/screens/PlaylistView.tsx | 6 +- app/state/trackplayer.ts | 107 ++++++++++++++++++++-------- 5 files changed, 89 insertions(+), 41 deletions(-) diff --git a/app/components/TrackPlayerState.tsx b/app/components/TrackPlayerState.tsx index 10527ad..d488b21 100644 --- a/app/components/TrackPlayerState.tsx +++ b/app/components/TrackPlayerState.tsx @@ -8,7 +8,7 @@ import { playerStateAtom, progressAtom, progressSubsAtom, - queueWriteAtom, + queueAtom, useRefreshCurrentTrack, useRefreshPlayerState, useRefreshProgress, @@ -85,7 +85,7 @@ const PlayerState = () => { } const QueueState = () => { - const setQueue = useUpdateAtom(queueWriteAtom) + const setQueue = useUpdateAtom(queueAtom) const refreshQueue = useRefreshQueue() const update = async (payload?: Payload) => { diff --git a/app/screens/AlbumView.tsx b/app/screens/AlbumView.tsx index bd7505b..0b167ee 100644 --- a/app/screens/AlbumView.tsx +++ b/app/screens/AlbumView.tsx @@ -26,7 +26,8 @@ const AlbumDetails: React.FC<{ const Songs = () => ( <> -