diff --git a/frontend/src/app/main/data/comments.cljs b/frontend/src/app/main/data/comments.cljs index ce8e1bd6d..5762229d4 100644 --- a/frontend/src/app/main/data/comments.cljs +++ b/frontend/src/app/main/data/comments.cljs @@ -274,7 +274,9 @@ (ptk/reify ::delete-comment ptk/UpdateEvent (update [_ state] - (d/update-in-when state [:comments thread-id] dissoc id)) + (-> state + (d/update-in-when [:comments thread-id] dissoc id) + (d/update-in-when [:comment-threads thread-id :count-comments] dec))) ptk/WatchEvent (watch [_ state _] diff --git a/frontend/src/app/main/ui/workspace/sidebar/assets/common.cljs b/frontend/src/app/main/ui/workspace/sidebar/assets/common.cljs index 888143fdb..4c6fa807c 100644 --- a/frontend/src/app/main/ui/workspace/sidebar/assets/common.cljs +++ b/frontend/src/app/main/ui/workspace/sidebar/assets/common.cljs @@ -142,7 +142,7 @@ on-collapsed (mf/use-fn - (mf/deps file-id section open?) + (mf/deps file-id section open? assets-count) (fn [_] (when (< 0 assets-count) (st/emit! (dw/set-assets-section-open file-id section (not open?)))))) diff --git a/frontend/src/app/main/ui/workspace/sidebar/options/menus/typography.cljs b/frontend/src/app/main/ui/workspace/sidebar/options/menus/typography.cljs index 0d7977266..44d3de561 100644 --- a/frontend/src/app/main/ui/workspace/sidebar/options/menus/typography.cljs +++ b/frontend/src/app/main/ui/workspace/sidebar/options/menus/typography.cljs @@ -441,6 +441,7 @@ [{:keys [visible? typography editable? name-input-ref on-close on-change on-name-blur local? navigate-to-library on-key-down]}] (let [ref (mf/use-ref nil) font-data (fonts/get-font-data (:font-id typography))] + (fonts/ensure-loaded! (:font-id typography)) (mf/use-effect (mf/deps visible?)