0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-08 07:50:43 -05:00

🐛 Fix toggle comments and history states

This commit is contained in:
Eva Marco 2024-03-19 13:39:48 +01:00 committed by Andrey Antukh
parent aae4c13231
commit 151421c8db
2 changed files with 8 additions and 2 deletions

View file

@ -89,7 +89,6 @@
(update [_ state]
(update state :workspace-layout
(fn [flags]
(prn flags)
(if force?
(conj flags flag)
(if (contains? flags flag)

View file

@ -179,6 +179,10 @@
(mf/use-fn
(mf/deps selected-drawtool)
(fn [_]
(when (contains? layout :document-history)
(st/emit! (-> (dw/remove-layout-flag :document-history)
(vary-meta assoc ::ev/origin "workspace-header"))))
(if (= :comments selected-drawtool)
(st/emit! :interrupt)
(active-comments))))
@ -187,8 +191,11 @@
(mf/use-fn
(mf/deps selected-drawtool)
(fn []
(when (= :comments selected-drawtool)
(st/emit! :interrupt))
(st/emit! :interrupt
(-> (dw/toggle-layout-flag :comments)
(vary-meta assoc ::ev/origin "workspace-header"))))
(st/emit! (-> (dw/toggle-layout-flag :document-history)
(vary-meta assoc ::ev/origin "workspace-header")))))]