mirror of
https://github.com/penpot/penpot.git
synced 2026-04-26 11:48:28 +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))))))
|
||||
|
||||
ptk/WatchEvent
|
||||
(watch [_ _ _]
|
||||
(watch [_ _ stream]
|
||||
(when (and timeout (pos? timeout))
|
||||
(->> (rx/of (check-open-transactions timeout))
|
||||
;; Wait the configured time
|
||||
(rx/delay timeout))))))
|
||||
|
||||
(let [stoper (rx/filter (ptk/type? ::start-undo-transaction) stream)]
|
||||
(->> (rx/of (check-open-transactions timeout))
|
||||
;; Wait the configured time
|
||||
(rx/delay timeout)
|
||||
(rx/take-until stoper)))))))
|
||||
|
||||
(defn discard-undo-transaction
|
||||
"Updates the state to discard any current and pending undo transaction."
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user