mirror of
https://github.com/penpot/penpot.git
synced 2025-08-07 14:38:33 +02:00
Merge pull request #4731 from penpot/niwinz-bugfix-6
🐛 Fix many race conditions on thumbnail generation process
This commit is contained in:
commit
22ede6b08e
6 changed files with 148 additions and 160 deletions
|
@ -109,7 +109,7 @@
|
|||
(fn [{:keys [width height]}]
|
||||
(when (or (not (mth/close? width fixed-width 5))
|
||||
(not (mth/close? height fixed-height 5)))
|
||||
(st/emit! (dwt/request-thumbnail file-id page-id frame-id "frame" "check-thumbnail-size"))))))))
|
||||
(st/emit! (dwt/update-thumbnail file-id page-id frame-id "frame" "check-thumbnail-size"))))))))
|
||||
|
||||
(defn root-frame-wrapper-factory
|
||||
[shape-wrapper]
|
||||
|
@ -176,7 +176,8 @@
|
|||
(mf/with-effect []
|
||||
(when-not (some? thumbnail-uri)
|
||||
(tm/schedule-on-idle
|
||||
#(st/emit! (dwt/request-thumbnail file-id page-id frame-id "frame" "root-frame"))))
|
||||
#(st/emit! (dwt/update-thumbnail file-id page-id frame-id "frame" "root-frame"))))
|
||||
|
||||
#(when-let [task (mf/ref-val task-ref)]
|
||||
(d/close! task)))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue