diff options
author | Miguel Ángel Moreno <mail@migalmoreno.com> | 2024-11-23 22:47:51 +0100 |
---|---|---|
committer | Miguel Ángel Moreno <mail@migalmoreno.com> | 2024-11-23 22:47:51 +0100 |
commit | b8ae5778830d6e2e899f8fdfbe7743186f50e809 (patch) | |
tree | 95fe817c4a7ab5488396c3f65b865a871e9cd58e | |
parent | d21dd529bb33d5b574643f63e7d268bfed1e4792 (diff) |
feat: hide search form on main player and queue
-rw-r--r-- | src/frontend/tubo/player/events.cljs | 4 | ||||
-rw-r--r-- | src/frontend/tubo/queue/events.cljs | 4 |
2 files changed, 6 insertions, 2 deletions
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 |