mirror of
https://github.com/penpot/penpot.git
synced 2025-01-10 08:50:57 -05:00
🐛 Fixes problem with remote changes
This commit is contained in:
parent
70258e0eee
commit
648c088d02
1 changed files with 8 additions and 5 deletions
|
@ -200,13 +200,16 @@
|
|||
(ptk/reify ::handle-file-change
|
||||
ptk/WatchEvent
|
||||
(watch [_ state stream]
|
||||
(let [page-ids (into #{} (comp (map :page-id)
|
||||
(filter identity))
|
||||
changes)]
|
||||
(let [changes-by-pages (group-by :page-id changes)
|
||||
process-page-changes
|
||||
(fn [[page-id changes]]
|
||||
(dwc/update-indices page-id changes))]
|
||||
|
||||
(rx/merge
|
||||
(rx/of (dwp/shapes-changes-persisted file-id msg))
|
||||
(when (seq page-ids)
|
||||
(rx/from (map dwc/update-indices page-ids changes))))))))
|
||||
|
||||
(when-not (empty? changes-by-pages)
|
||||
(rx/from (map process-page-changes changes-by-pages))))))))
|
||||
|
||||
(s/def ::library-change-event
|
||||
(s/keys :req-un [::type
|
||||
|
|
Loading…
Reference in a new issue