mirror of
https://github.com/penpot/penpot.git
synced 2025-01-09 08:20:45 -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]
|
||||||
(update state :workspace-layout
|
(update state :workspace-layout
|
||||||
(fn [flags]
|
(fn [flags]
|
||||||
(prn flags)
|
|
||||||
(if force?
|
(if force?
|
||||||
(conj flags flag)
|
(conj flags flag)
|
||||||
(if (contains? flags flag)
|
(if (contains? flags flag)
|
||||||
|
|
|
@ -179,6 +179,10 @@
|
||||||
(mf/use-fn
|
(mf/use-fn
|
||||||
(mf/deps selected-drawtool)
|
(mf/deps selected-drawtool)
|
||||||
(fn [_]
|
(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)
|
(if (= :comments selected-drawtool)
|
||||||
(st/emit! :interrupt)
|
(st/emit! :interrupt)
|
||||||
(active-comments))))
|
(active-comments))))
|
||||||
|
@ -187,8 +191,11 @@
|
||||||
(mf/use-fn
|
(mf/use-fn
|
||||||
(mf/deps selected-drawtool)
|
(mf/deps selected-drawtool)
|
||||||
(fn []
|
(fn []
|
||||||
|
|
||||||
(when (= :comments selected-drawtool)
|
(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)
|
(st/emit! (-> (dw/toggle-layout-flag :document-history)
|
||||||
(vary-meta assoc ::ev/origin "workspace-header")))))]
|
(vary-meta assoc ::ev/origin "workspace-header")))))]
|
||||||
|
|
Loading…
Reference in a new issue