diff options
author | Miguel Ángel Moreno <mail@migalmoreno.com> | 2024-02-18 17:36:42 +0100 |
---|---|---|
committer | Miguel Ángel Moreno <mail@migalmoreno.com> | 2024-02-18 17:36:42 +0100 |
commit | 275ec7ef7458770a8199b280d06b2d4de224ea80 (patch) | |
tree | 4f4b31c578535d5a93edc0b8ced8256ca5bd7e23 /src | |
parent | e1b8b5c58d759ec90f5201b08942197c2e71e1f3 (diff) |
feat(frontend): remove unnecessary service-color from handlers
Diffstat (limited to 'src')
-rw-r--r-- | src/frontend/tubo/events.cljs | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/src/frontend/tubo/events.cljs b/src/frontend/tubo/events.cljs index 827dec5..1167048 100644 --- a/src/frontend/tubo/events.cljs +++ b/src/frontend/tubo/events.cljs @@ -379,10 +379,9 @@ (rf/reg-event-fx ::switch-to-audio-player [(rf/inject-cofx :store)] - (fn [{:keys [db store]} [_ stream service-color]] - (let [full-stream (conj {:service-color service-color} stream) - updated-db (update db :media-queue conj full-stream) - idx (.indexOf (:media-queue updated-db) full-stream)] + (fn [{:keys [db store]} [_ stream]] + (let [updated-db (update db :media-queue conj stream) + idx (.indexOf (:media-queue updated-db) stream)] {:db (-> updated-db (assoc :show-audio-player true)) :store (-> store @@ -393,14 +392,11 @@ (rf/reg-event-fx ::enqueue-related-streams [(rf/inject-cofx :store)] - (fn [{:keys [db store]} [_ streams service-color]] + (fn [{:keys [db store]} [_ streams]] {:db (assoc db :show-audio-player true) :store (assoc store :show-audio-player true) :fx (into [] (conj - (map #(identity [:dispatch - [::add-to-media-queue - (conj {:service-color service-color} %)]]) - streams) + (map #(identity [:dispatch [::add-to-media-queue %]]) streams) [:dispatch [::fetch-audio-player-stream (:url (first streams)) (count (:media-queue db)) (= (count (:media-queue db)) 0)]]))})) |