mirror of
https://github.com/penpot/penpot.git
synced 2025-01-09 08:20:45 -05:00
commit
1d55b30132
3 changed files with 5 additions and 2 deletions
|
@ -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 _]
|
||||
|
|
|
@ -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?))))))
|
||||
|
|
|
@ -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?)
|
||||
|
|
Loading…
Reference in a new issue