From 4cb73182cbb46ccdbfe59aa3e9045017b6fb3ca9 Mon Sep 17 00:00:00 2001 From: Violet Caulfield Date: Tue, 11 Feb 2025 08:38:42 -0600 Subject: [PATCH] fixes to player provider --- player/provider.tsx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/player/provider.tsx b/player/provider.tsx index c6abb132..d8a6a78e 100644 --- a/player/provider.tsx +++ b/player/provider.tsx @@ -322,14 +322,14 @@ const PlayerContextInitializer = () => { //#region useEffects useEffect(() => { - if (queue) + if (initialized && queue) storage.set(MMKVStorageKeys.PlayQueue, JSON.stringify(queue)) }, [ queue ]) useEffect(() => { - if (nowPlaying) + if (initialized && nowPlaying) storage.set(MMKVStorageKeys.NowPlaying, JSON.stringify(nowPlaying)) }, [ nowPlaying @@ -345,7 +345,10 @@ const PlayerContextInitializer = () => { } setInitialized(true); - }) + }, [ + queue, + nowPlaying + ]) //#endregion useEffects //#region return