aboutsummaryrefslogtreecommitdiff
path: root/src/frontend
diff options
context:
space:
mode:
authorMiguel Ángel Moreno <mail@migalmoreno.com>2023-01-05 15:08:44 +0100
committerMiguel Ángel Moreno <mail@migalmoreno.com>2023-01-05 15:08:44 +0100
commit107266a1a492bf793e538854248059016fe6182b (patch)
tree6ee26ecde35e49d74d0b2d34144fbd258ea64429 /src/frontend
parent67007e8bddb6aea4b511d5eb05ed931d352d5467 (diff)
feat(frontend): Load comments on stream load
Diffstat (limited to 'src/frontend')
-rw-r--r--src/frontend/tau/events.cljs8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/frontend/tau/events.cljs b/src/frontend/tau/events.cljs
index dace6f5..d854b0e 100644
--- a/src/frontend/tau/events.cljs
+++ b/src/frontend/tau/events.cljs
@@ -312,9 +312,11 @@
(rf/reg-event-fx
::load-stream
(fn [{:keys [db]} [_ res]]
- {:db (assoc db :stream (js->clj res :keywordize-keys true)
- :show-page-loading false)
- :fx [[:dispatch [::change-stream-format nil]]]}))
+ (let [stream-res (js->clj res :keywordize-keys true)]
+ {:db (assoc db :stream stream-res
+ :show-page-loading false)
+ :fx [[:dispatch [::change-stream-format nil]]
+ [:dispatch [::get-comments (:url stream-res)]]]})))
(rf/reg-event-fx
::get-stream