aboutsummaryrefslogtreecommitdiff
path: root/src/frontend/tau/events.cljs
diff options
context:
space:
mode:
Diffstat (limited to 'src/frontend/tau/events.cljs')
-rw-r--r--src/frontend/tau/events.cljs14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/frontend/tau/events.cljs b/src/frontend/tau/events.cljs
index ed01467..24da7d0 100644
--- a/src/frontend/tau/events.cljs
+++ b/src/frontend/tau/events.cljs
@@ -155,11 +155,21 @@
:nextPage (js/encodeURIComponent next-page-url)})
:db (assoc db :show-pagination-loading true)))))
+(rf/reg-event-db
+ ::change-global-stream
+ (fn [db [_ global-stream]]
+ (assoc db :global-stream global-stream)))
+
+(rf/reg-event-db
+ ::toggle-global-player
+ (fn [db _]
+ (assoc db :show-global-player (not (:show-global-player db)))))
+
(rf/reg-event-fx
::switch-to-global-player
- (fn [{:keys [db]} [_ res]]
+ (fn [{:keys [db]} [_ global-stream]]
{:db (assoc db :show-global-player true)
- :fx [[:dispatch [::change-global-search res]]]}))
+ :fx [[:dispatch [::change-global-stream global-stream]]]}))
(rf/reg-event-db
::load-services