fix(whiteboard): persisting whiteboard block collapsed state

pull/7097/head
Peng Xiao 2022-10-25 14:54:28 +08:00 committed by Tienson Qin
parent 90150197f8
commit afd7c1b0f0
2 changed files with 7 additions and 5 deletions

View File

@ -222,11 +222,11 @@
(let [_ (when verbose (println "Parsing start: " file))
{:keys [pages blocks]} (gp-util/safe-read-string content)
blocks (map
(fn [block]
(-> block
(gp-util/dissoc-in [:block/parent :block/name])
(gp-util/dissoc-in [:block/left :block/name])))
blocks)
(fn [block]
(-> block
(gp-util/dissoc-in [:block/parent :block/name])
(gp-util/dissoc-in [:block/left :block/name])))
blocks)
serialized-page (first pages)
;; whiteboard edn file should normally have valid :block/original-name, :block/name, :block/uuid
page-name (-> (or (:block/name serialized-page)

View File

@ -23,6 +23,7 @@
:block/format
:block/created-at
:block/updated-at
:block/collapsed?
{:block/page [:block/uuid]}
{:block/left [:block/uuid]}
{:block/parent [:block/uuid]}])
@ -33,6 +34,7 @@
(dissoc block
:db/id
:block/uuid ;; shape block uuid is read from properties
:block/collapsed?
:block/content
:block/format
:block/left