diff options
author | Miguel Ángel Moreno <mail@migalmoreno.com> | 2024-12-19 22:38:14 +0100 |
---|---|---|
committer | Miguel Ángel Moreno <mail@migalmoreno.com> | 2024-12-19 22:39:36 +0100 |
commit | 6e0c07502ddba0817478b0ba29d768bc1dedf1e4 (patch) | |
tree | 1ca5a37d8533925c3ad9d95f9f3ece4ce6dd3baf /src | |
parent | 0f831aff6615c9d9ad0a58a45a159137b2aca5f8 (diff) |
fix: fix persistence of unshuffled queue
Diffstat (limited to 'src')
-rw-r--r-- | src/frontend/tubo/bg_player/events.cljs | 4 | ||||
-rw-r--r-- | src/frontend/tubo/queue/events.cljs | 7 |
2 files changed, 8 insertions, 3 deletions
diff --git a/src/frontend/tubo/bg_player/events.cljs b/src/frontend/tubo/bg_player/events.cljs index 044c687..e7dcce8 100644 --- a/src/frontend/tubo/bg_player/events.cljs +++ b/src/frontend/tubo/bg_player/events.cljs @@ -56,7 +56,9 @@ (fn [elem] (-> elem (assoc :queue []) - (assoc :queue/position 0)))] + (assoc :queue/unshuffled nil) + (assoc :queue/position 0) + (assoc :player/shuffled false)))] {:db (remove-entries db) :store (remove-entries store) :fx [[:dispatch [:bg-player/pause true]] diff --git a/src/frontend/tubo/queue/events.cljs b/src/frontend/tubo/queue/events.cljs index 1a452bf..7774783 100644 --- a/src/frontend/tubo/queue/events.cljs +++ b/src/frontend/tubo/queue/events.cljs @@ -37,8 +37,11 @@ (if val shuffled-queue unshuffled-queue))] {:db (assoc updated-db :player/shuffled val - :queue/unshuffled unshuffled-queue) - :store (assoc store :queue (:queue updated-db) :player/shuffled val)}))) + :queue/unshuffled (if val unshuffled-queue nil)) + :store (assoc store + :queue (:queue updated-db) + :queue/unshuffled (if val unshuffled-queue nil) + :player/shuffled val)}))) (rf/reg-event-fx :queue/add |