aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiguel Ángel Moreno <mail@migalmoreno.com>2024-04-20 20:48:47 +0200
committerMiguel Ángel Moreno <mail@migalmoreno.com>2024-04-20 20:48:47 +0200
commitb9081b2b1900bce25e50c19b4f16bc59d05034fe (patch)
tree3357a5d1256bdc687c9d3504cfb9ba197174a66e
parenta04c726cdad14c6fe55fa2d576b879e19a007a6e (diff)
feat: remove extra guards for stream type on streams enqueue
-rw-r--r--src/frontend/tubo/events.cljs8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/frontend/tubo/events.cljs b/src/frontend/tubo/events.cljs
index b8f3b1f..4b0ca5c 100644
--- a/src/frontend/tubo/events.cljs
+++ b/src/frontend/tubo/events.cljs
@@ -478,11 +478,9 @@
{:db (assoc db :show-audio-player true)
:store (assoc store :show-audio-player true)
:fx (into [] (conj
- (map #(when (= (:type %) "stream")
- (identity [:dispatch [::add-to-media-queue %]])) streams)
- (when (= (:type (first streams)) "stream")
- [:dispatch [::fetch-audio-player-stream (first streams)
- (count (:media-queue db)) (= (count (:media-queue db)) 0)]])))}))
+ (map #(identity [:dispatch [::add-to-media-queue %]]) streams)
+ [:dispatch [::fetch-audio-player-stream (first streams)
+ (count (:media-queue db)) (= (count (:media-queue db)) 0)]]))}))
(rf/reg-event-db
::modal