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:
parent
142ae32256
commit
9e0fb44b3f
1 changed files with 1 additions and 9 deletions
|
@ -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]
|
||||
|
|
Loading…
Add table
Reference in a new issue