diff --git a/src/main/dda/masto_embed/modes.cljs b/src/main/dda/masto_embed/modes.cljs index d1b5ed7..294e1eb 100644 --- a/src/main/dda/masto_embed/modes.cljs +++ b/src/main/dda/masto_embed/modes.cljs @@ -61,7 +61,7 @@ first))) out)) -(defn replies-mode [host-url account-name post-id filter-favorited] +(defn replies-mode-raw [host-url account-name post-id filter-favorited] (go (let [replies (-> (
> combined (filter #(or (not filter-favorited) (:favorited %))) (reverse) - (map :status) - (th/masto->html "replies-mode") - (render-html) - (b/render-to-document))))) + (map :status))))) -(defn account-mode [host-url account-name] +(defn replies-mode [host-url account-name post-id filter-favorited] + (go + (->> (replies-mode-raw host-url account-name post-id filter-favorited) + (th/masto->html "replies-mode") + (render-html) + (b/render-to-document)))) + +(defn account-mode-raw [host-url account-name] (go (let [account-id ( @@ -85,7 +89,11 @@ (->> status (filter #(= nil (:reblog %))) (filter #(= nil (:in_reply_to_account_id %))) - (take 4) - (th/masto->html "account-mode") - (render-html) - (b/render-to-document))))) + (take 4))))) + +(defn account-mode [host-url account-name] + (go + (->> (account-mode-raw host-url account-name) + (th/masto->html "account-mode") + (render-html) + (b/render-to-document))))