mirror of
https://github.com/penpot/penpot.git
synced 2026-09-09 13:39:02 +00:00
⚡ Remove duplicated execution of check-open-transactions
This commit is contained in:
parent
c9393c0cfb
commit
1384ed8aba
@ -170,12 +170,13 @@
|
|||||||
(update :transactions-pending assoc id (ct/now))))))
|
(update :transactions-pending assoc id (ct/now))))))
|
||||||
|
|
||||||
ptk/WatchEvent
|
ptk/WatchEvent
|
||||||
(watch [_ _ _]
|
(watch [_ _ stream]
|
||||||
(when (and timeout (pos? timeout))
|
(when (and timeout (pos? timeout))
|
||||||
(->> (rx/of (check-open-transactions timeout))
|
(let [stoper (rx/filter (ptk/type? ::start-undo-transaction) stream)]
|
||||||
;; Wait the configured time
|
(->> (rx/of (check-open-transactions timeout))
|
||||||
(rx/delay timeout))))))
|
;; Wait the configured time
|
||||||
|
(rx/delay timeout)
|
||||||
|
(rx/take-until stoper)))))))
|
||||||
|
|
||||||
(defn discard-undo-transaction
|
(defn discard-undo-transaction
|
||||||
"Updates the state to discard any current and pending undo transaction."
|
"Updates the state to discard any current and pending undo transaction."
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user