diff options
author | Miguel Ángel Moreno <mail@migalmoreno.com> | 2024-08-25 09:02:11 +0200 |
---|---|---|
committer | Miguel Ángel Moreno <mail@migalmoreno.com> | 2024-08-25 09:02:11 +0200 |
commit | 143fc6ce45cee69ea2b5352ad8041f72cd50c2d8 (patch) | |
tree | 280ef4b90f9c0f39195e69f20418de515d4e7942 | |
parent | 97eb516331fd4f5e4d968c72786a266c8afc7954 (diff) |
feat: don't persist bg player hide on showing main player
-rw-r--r-- | src/frontend/tubo/player/events.cljs | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/frontend/tubo/player/events.cljs b/src/frontend/tubo/player/events.cljs index c9fca56..f8476c3 100644 --- a/src/frontend/tubo/player/events.cljs +++ b/src/frontend/tubo/player/events.cljs @@ -228,21 +228,18 @@ (rf/reg-event-fx :player/switch-from-main - [(rf/inject-cofx :store) - (rf/inject-cofx ::inject/sub [:elapsed-time])] - (fn [{:keys [db store elapsed-time]} [_ stream]] + [(rf/inject-cofx ::inject/sub [:elapsed-time])] + (fn [{:keys [db elapsed-time]} [_ stream]] {:db (assoc db :background-player/show true) - :store (assoc store :background-player/show true) :fx [[:dispatch [:player/show-main-player false]] [:dispatch [:main-player/pause true]]]})) (rf/reg-event-fx :player/switch-to-main [(rf/inject-cofx :store)] - (fn [{:keys [db store]} [_ stream]] + (fn [{:keys [db]} [_ stream]] {:fx [[:dispatch [:player/show-main-player true]]] :db (assoc db :background-player/show false) - :store (assoc store :background-player/show false) :scroll-to-top nil})) (rf/reg-event-fx |