mirror of
https://github.com/penpot/penpot.git
synced 2025-02-02 04:19:08 -05:00
🐛 Fix grid not syncing in multi user
This commit is contained in:
parent
4b52612682
commit
87d323bb4c
2 changed files with 19 additions and 8 deletions
|
@ -43,6 +43,7 @@
|
||||||
- Fix components marked as touched when moved [Taiga #4061](https://tree.taiga.io/project/penpot/task/4061)
|
- Fix components marked as touched when moved [Taiga #4061](https://tree.taiga.io/project/penpot/task/4061)
|
||||||
- Fix boards grouped shouldn't show the title [Taiga #4251](https://tree.taiga.io/project/penpot/issue/4251)
|
- Fix boards grouped shouldn't show the title [Taiga #4251](https://tree.taiga.io/project/penpot/issue/4251)
|
||||||
- Fix gradient handlers are under resize handlers[Taiga #4298](https://tree.taiga.io/project/penpot/issue/4298)
|
- Fix gradient handlers are under resize handlers[Taiga #4298](https://tree.taiga.io/project/penpot/issue/4298)
|
||||||
|
- Fix grid not syncing immediately in multiuser [Taiga #4339](https://tree.taiga.io/project/penpot/issue/4339)
|
||||||
|
|
||||||
### :arrow_up: Deps updates
|
### :arrow_up: Deps updates
|
||||||
### :heart: Community contributions by (Thank you!)
|
### :heart: Community contributions by (Thank you!)
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
[app.common.pages.changes-spec :as pcs]
|
[app.common.pages.changes-spec :as pcs]
|
||||||
[app.common.spec :as us]
|
[app.common.spec :as us]
|
||||||
[app.common.types.file :as ctf]
|
[app.common.types.file :as ctf]
|
||||||
|
[app.common.types.shape-tree :as ctst]
|
||||||
[app.common.uuid :as uuid]
|
[app.common.uuid :as uuid]
|
||||||
[app.config :as cf]
|
[app.config :as cf]
|
||||||
[app.main.data.dashboard :as dd]
|
[app.main.data.dashboard :as dd]
|
||||||
|
@ -219,14 +220,23 @@
|
||||||
(ptk/reify ::changes-persisted
|
(ptk/reify ::changes-persisted
|
||||||
ptk/UpdateEvent
|
ptk/UpdateEvent
|
||||||
(update [_ state]
|
(update [_ state]
|
||||||
|
(let [changes (group-by :page-id changes)]
|
||||||
(if (= file-id (:current-file-id state))
|
(if (= file-id (:current-file-id state))
|
||||||
(-> state
|
(-> state
|
||||||
(update-in [:workspace-file :revn] max revn)
|
(update-in [:workspace-file :revn] max revn)
|
||||||
(update :workspace-data cp/process-changes changes))
|
(update :workspace-data (fn [file]
|
||||||
|
(loop [fdata file
|
||||||
|
entries (seq changes)]
|
||||||
|
(if-let [[page-id changes] (first entries)]
|
||||||
|
(recur (-> fdata
|
||||||
|
(cp/process-changes changes)
|
||||||
|
(ctst/update-object-indices page-id))
|
||||||
|
(rest entries))
|
||||||
|
fdata)))))
|
||||||
(-> state
|
(-> state
|
||||||
(update-in [:workspace-libraries file-id :revn] max revn)
|
(update-in [:workspace-libraries file-id :revn] max revn)
|
||||||
(update-in [:workspace-libraries file-id :data]
|
(update-in [:workspace-libraries file-id :data]
|
||||||
cp/process-changes changes))))))
|
cp/process-changes changes)))))))
|
||||||
|
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
|
Loading…
Add table
Reference in a new issue