mirror of
https://github.com/penpot/penpot.git
synced 2025-02-03 04:49:03 -05:00
🐛 Remove unnecesary delay on hide notification banner
This commit is contained in:
parent
142ae32256
commit
9e0fb44b3f
1 changed files with 1 additions and 9 deletions
|
@ -15,7 +15,6 @@
|
||||||
(declare hide)
|
(declare hide)
|
||||||
(declare show)
|
(declare show)
|
||||||
|
|
||||||
(def default-animation-timeout 600)
|
|
||||||
(def default-timeout 7000)
|
(def default-timeout 7000)
|
||||||
|
|
||||||
(def ^:private
|
(def ^:private
|
||||||
|
@ -76,14 +75,7 @@
|
||||||
(ptk/reify ::hide
|
(ptk/reify ::hide
|
||||||
ptk/UpdateEvent
|
ptk/UpdateEvent
|
||||||
(update [_ state]
|
(update [_ state]
|
||||||
(d/update-when state :message assoc :status :hide))
|
(dissoc state :message))))
|
||||||
|
|
||||||
ptk/WatchEvent
|
|
||||||
(watch [_ _ stream]
|
|
||||||
(let [stopper (rx/filter (ptk/type? ::show) stream)]
|
|
||||||
(->> (rx/of #(dissoc % :message))
|
|
||||||
(rx/delay default-animation-timeout)
|
|
||||||
(rx/take-until stopper))))))
|
|
||||||
|
|
||||||
(defn hide-tag
|
(defn hide-tag
|
||||||
[tag]
|
[tag]
|
||||||
|
|
Loading…
Add table
Reference in a new issue