mirror of
https://github.com/penpot/penpot.git
synced 2025-06-06 00:21:39 +02:00
🐛 Enhancement on old thumbnail invalidation after sync
This commit is contained in:
parent
3e965c96e7
commit
fc1db9b985
2 changed files with 61 additions and 9 deletions
|
@ -946,17 +946,16 @@
|
|||
|
||||
changes (pcb/concat-changes library-changes file-changes)
|
||||
|
||||
extract-shapes (fn [change]
|
||||
(for [page-id [(:page-id change)]
|
||||
id (:shapes change)]
|
||||
(-> (get-in state [:workspace-data :pages-index page-id :objects id])
|
||||
(assoc :page-id page-id))))
|
||||
|
||||
updated-copies (->> changes
|
||||
find-heads (fn [change]
|
||||
(->> (ch/heads-changed file change)
|
||||
(map #(assoc %1 :page-id (:page-id change)))))
|
||||
|
||||
|
||||
|
||||
updated-copies (->> changes
|
||||
:redo-changes
|
||||
(filter #(= (:type %) :reg-objects))
|
||||
(mapcat extract-shapes)
|
||||
(filter ctk/instance-head?)
|
||||
(mapcat find-heads)
|
||||
distinct)]
|
||||
|
||||
(log/debug :msg "SYNC-FILE finished" :js/rchanges (log-changes
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue