mirror of
https://github.com/penpot/penpot.git
synced 2025-01-09 16:30:37 -05:00
Avoid persist page operation on first workspace loading.
This commit is contained in:
parent
e050c16f9a
commit
b37d3a21b7
2 changed files with 7 additions and 3 deletions
|
@ -29,4 +29,6 @@
|
|||
(defn init
|
||||
"Initialize the state materialization."
|
||||
[]
|
||||
(rx/to-atom stream state))
|
||||
(as-> stream $
|
||||
(rx/dedupe $)
|
||||
(rx/to-atom $ state)))
|
||||
|
|
|
@ -34,8 +34,9 @@
|
|||
(l/focus-atom $ st/state)))
|
||||
|
||||
(defn on-page-change
|
||||
[page]
|
||||
(rs/emit! (udp/update-page page)))
|
||||
[buffer]
|
||||
(let [page (second buffer)]
|
||||
(rs/emit! (udp/update-page page))))
|
||||
|
||||
(defn subscribe-to-page-changes
|
||||
[pageid]
|
||||
|
@ -43,6 +44,7 @@
|
|||
(rx/from-atom $)
|
||||
(rx/dedupe #(dissoc % :version) $)
|
||||
(rx/debounce 1000 $)
|
||||
(rx/buffer 2 1 $)
|
||||
(rx/subscribe $ on-page-change #(throw %))))
|
||||
|
||||
(defn- workspace-will-mount
|
||||
|
|
Loading…
Reference in a new issue