mirror of
https://github.com/penpot/penpot.git
synced 2025-07-26 08:47:19 +02:00
commit
1d55b30132
3 changed files with 5 additions and 2 deletions
|
@ -274,7 +274,9 @@
|
||||||
(ptk/reify ::delete-comment
|
(ptk/reify ::delete-comment
|
||||||
ptk/UpdateEvent
|
ptk/UpdateEvent
|
||||||
(update [_ state]
|
(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
|
ptk/WatchEvent
|
||||||
(watch [_ state _]
|
(watch [_ state _]
|
||||||
|
|
|
@ -142,7 +142,7 @@
|
||||||
|
|
||||||
on-collapsed
|
on-collapsed
|
||||||
(mf/use-fn
|
(mf/use-fn
|
||||||
(mf/deps file-id section open?)
|
(mf/deps file-id section open? assets-count)
|
||||||
(fn [_]
|
(fn [_]
|
||||||
(when (< 0 assets-count)
|
(when (< 0 assets-count)
|
||||||
(st/emit! (dw/set-assets-section-open file-id section (not open?))))))
|
(st/emit! (dw/set-assets-section-open file-id section (not open?))))))
|
||||||
|
|
|
@ -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]}]
|
[{: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)
|
(let [ref (mf/use-ref nil)
|
||||||
font-data (fonts/get-font-data (:font-id typography))]
|
font-data (fonts/get-font-data (:font-id typography))]
|
||||||
|
(fonts/ensure-loaded! (:font-id typography))
|
||||||
|
|
||||||
(mf/use-effect
|
(mf/use-effect
|
||||||
(mf/deps visible?)
|
(mf/deps visible?)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue