From 143fc6ce45cee69ea2b5352ad8041f72cd50c2d8 Mon Sep 17 00:00:00 2001 From: Miguel Ángel Moreno Date: Sun, 25 Aug 2024 09:02:11 +0200 Subject: feat: don't persist bg player hide on showing main player --- src/frontend/tubo/player/events.cljs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'src') 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 -- cgit v1.2.3