mirror of
https://github.com/penpot/penpot.git
synced 2025-07-22 10:07:14 +02:00
🐛 Add missing retry cancelation when thumbnail is discarded
This commit is contained in:
parent
0528c26b5e
commit
5486ab43a8
2 changed files with 16 additions and 3 deletions
|
@ -6,6 +6,7 @@
|
|||
|
||||
(ns app.util.timers
|
||||
(:require
|
||||
[app.common.data :as d]
|
||||
[beicon.core :as rx]
|
||||
[promesa.core :as p]))
|
||||
|
||||
|
@ -14,7 +15,12 @@
|
|||
(schedule 0 func))
|
||||
([ms func]
|
||||
(let [sem (js/setTimeout #(func) ms)]
|
||||
(reify rx/IDisposable
|
||||
(reify
|
||||
d/ICloseable
|
||||
(close! [_]
|
||||
(js/clearTimeout sem))
|
||||
|
||||
rx/IDisposable
|
||||
(-dispose [_]
|
||||
(js/clearTimeout sem))))))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue