mirror of
https://github.com/penpot/penpot.git
synced 2025-01-24 23:49:45 -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/reify ::handle-file-change
|
||||||
ptk/WatchEvent
|
ptk/WatchEvent
|
||||||
(watch [_ state stream]
|
(watch [_ state stream]
|
||||||
(let [page-ids (into #{} (comp (map :page-id)
|
(let [changes-by-pages (group-by :page-id changes)
|
||||||
(filter identity))
|
process-page-changes
|
||||||
changes)]
|
(fn [[page-id changes]]
|
||||||
|
(dwc/update-indices page-id changes))]
|
||||||
|
|
||||||
(rx/merge
|
(rx/merge
|
||||||
(rx/of (dwp/shapes-changes-persisted file-id msg))
|
(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/def ::library-change-event
|
||||||
(s/keys :req-un [::type
|
(s/keys :req-un [::type
|
||||||
|
|
Loading…
Add table
Reference in a new issue