mirror of
https://github.com/penpot/penpot.git
synced 2026-08-01 19:06:18 +00:00
🐛 Remove unnecesary delay on hide notification banner
This commit is contained in:
parent
142ae32256
commit
9e0fb44b3f
@ -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…
x
Reference in New Issue
Block a user