aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/frontend/tubo/bg_player/events.cljs4
-rw-r--r--src/frontend/tubo/queue/events.cljs7
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