mirror of
https://github.com/penpot/penpot.git
synced 2025-07-23 11:47:23 +02:00
Merge pull request #3856 from penpot/niwinz-develop-bugfixes-1
🐛 Add missing retry cancelation when thumbnail is discarded
This commit is contained in:
commit
6ed35ffdc8
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