mirror of
https://github.com/penpot/penpot.git
synced 2026-08-30 16:48:59 +00:00
🐛 Run post-font text relayout after pending fetches finish
Move relayout-after-fonts! from rx/subs! on-next to on-complete so font and image callbacks are not relayouted on every concat emission.
This commit is contained in:
parent
b0223ac0e5
commit
30e700a07e
@ -1706,11 +1706,12 @@
|
|||||||
(rx/reduce conj [])
|
(rx/reduce conj [])
|
||||||
(rx/catch #(rx/empty))))
|
(rx/catch #(rx/empty))))
|
||||||
(rx/subs!
|
(rx/subs!
|
||||||
(fn [_]
|
|
||||||
(relayout-after-fonts! shapes font-pending-ids)
|
|
||||||
(request-render "images-loaded"))
|
|
||||||
noop-fn
|
noop-fn
|
||||||
(fn [] (when (fn? on-complete) (on-complete)))))
|
noop-fn
|
||||||
|
(fn []
|
||||||
|
(relayout-after-fonts! shapes font-pending-ids)
|
||||||
|
(request-render "images-loaded")
|
||||||
|
(when (fn? on-complete) (on-complete)))))
|
||||||
;; No pending images — complete immediately.
|
;; No pending images — complete immediately.
|
||||||
(when on-complete (on-complete)))))
|
(when on-complete (on-complete)))))
|
||||||
|
|
||||||
@ -1857,11 +1858,11 @@
|
|||||||
(if (fn? callback) (callback) (rx/empty))))
|
(if (fn? callback) (callback) (rx/empty))))
|
||||||
(rx/reduce conj [])))
|
(rx/reduce conj [])))
|
||||||
(rx/subs!
|
(rx/subs!
|
||||||
(fn [_]
|
|
||||||
(relayout-after-fonts! shapes font-pending-acc)
|
|
||||||
(request-render "images-loaded"))
|
|
||||||
noop-fn
|
noop-fn
|
||||||
noop-fn)))))))))]
|
noop-fn
|
||||||
|
(fn []
|
||||||
|
(relayout-after-fonts! shapes font-pending-acc)
|
||||||
|
(request-render "images-loaded")))))))))))]
|
||||||
(process-next-chunk 0 [] [] []))))))
|
(process-next-chunk 0 [] [] []))))))
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user