mirror of
https://github.com/penpot/penpot.git
synced 2026-09-07 12:40:12 +00:00
🐛 Fix restore saved version keeps view-only (#9514)
* 🐛 Fix restore saved verrsion keeps view-only * 📎 Remove outdated note from CHANGES.md Remove note about restoring saved version from Preview mode. Signed-off-by: Andrey Antukh <niwi@niwi.nz> --------- Signed-off-by: Andrey Antukh <niwi@niwi.nz> Co-authored-by: Andrey Antukh <niwi@niwi.nz>
This commit is contained in:
parent
110db4380e
commit
c9d43006c8
@ -180,6 +180,12 @@
|
|||||||
[id]
|
[id]
|
||||||
(assert (uuid? id) "expected valid uuid for `id`")
|
(assert (uuid? id) "expected valid uuid for `id`")
|
||||||
(ptk/reify ::restore-version
|
(ptk/reify ::restore-version
|
||||||
|
ptk/UpdateEvent
|
||||||
|
(update [_ state]
|
||||||
|
;; Clear preview state if we're restoring from preview mode
|
||||||
|
(-> state
|
||||||
|
(update :workspace-versions dissoc :backup)
|
||||||
|
(update :workspace-global dissoc :read-only? :preview-id)))
|
||||||
ptk/WatchEvent
|
ptk/WatchEvent
|
||||||
(watch [_ state _]
|
(watch [_ state _]
|
||||||
(let [file-id (:current-file-id state)]
|
(let [file-id (:current-file-id state)]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user