0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-09 08:20:45 -05:00

Merge pull request #4262 from penpot/alotor-bugfix-28

Bugfixes
This commit is contained in:
Alejandro 2024-03-14 08:27:32 +01:00 committed by GitHub
commit 1d55b30132
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 5 additions and 2 deletions

View file

@ -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 _]

View file

@ -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?))))))

View file

@ -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?)