0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-23 23:18:48 -05:00

🐛 Remove unnecesary delay on hide notification banner

This commit is contained in:
Andrey Antukh 2024-07-22 13:11:14 +02:00
parent 142ae32256
commit 9e0fb44b3f

View file

@ -15,7 +15,6 @@
(declare hide)
(declare show)
(def default-animation-timeout 600)
(def default-timeout 7000)
(def ^:private
@ -76,14 +75,7 @@
(ptk/reify ::hide
ptk/UpdateEvent
(update [_ state]
(d/update-when state :message assoc :status :hide))
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))))))
(dissoc state :message))))
(defn hide-tag
[tag]