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:
parent
aae4c13231
commit
151421c8db
2 changed files with 8 additions and 2 deletions
|
@ -89,7 +89,6 @@
|
|||
(update [_ state]
|
||||
(update state :workspace-layout
|
||||
(fn [flags]
|
||||
(prn flags)
|
||||
(if force?
|
||||
(conj flags flag)
|
||||
(if (contains? flags flag)
|
||||
|
|
|
@ -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")))))]
|
||||
|
|
Loading…
Reference in a new issue