From 107266a1a492bf793e538854248059016fe6182b Mon Sep 17 00:00:00 2001 From: Miguel Ángel Moreno Date: Thu, 5 Jan 2023 15:08:44 +0100 Subject: feat(frontend): Load comments on stream load --- src/frontend/tau/events.cljs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/frontend/tau/events.cljs') 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 -- cgit v1.2.3