From b8ae5778830d6e2e899f8fdfbe7743186f50e809 Mon Sep 17 00:00:00 2001 From: Miguel Ángel Moreno Date: Sat, 23 Nov 2024 22:47:51 +0100 Subject: feat: hide search form on main player and queue --- src/frontend/tubo/player/events.cljs | 4 +++- src/frontend/tubo/queue/events.cljs | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/frontend/tubo/player/events.cljs b/src/frontend/tubo/player/events.cljs index 375c055..10195b5 100644 --- a/src/frontend/tubo/player/events.cljs +++ b/src/frontend/tubo/player/events.cljs @@ -228,7 +228,9 @@ (rf/reg-event-fx :player/show-main-player (fn [{:keys [db]} [_ val]] - {:db (assoc db :main-player/show val) + {:db (apply assoc + (assoc db :main-player/show val) + (when val [:show-search-form false])) :body-overflow val})) (rf/reg-event-fx diff --git a/src/frontend/tubo/queue/events.cljs b/src/frontend/tubo/queue/events.cljs index f44769b..1cc189f 100644 --- a/src/frontend/tubo/queue/events.cljs +++ b/src/frontend/tubo/queue/events.cljs @@ -5,7 +5,9 @@ (rf/reg-event-fx :queue/show (fn [{:keys [db]} [_ show?]] - {:db (assoc db :show-queue show?) + {:db (apply assoc + (assoc db :show-queue show?) + (when show? [:show-search-form false])) :body-overflow show?})) (rf/reg-event-fx -- cgit v1.2.3