✨ Keep toast for file reparation open until user closes it (#12662)

This commit is contained in:
Pablo Alba 2026-10-27 19:47:10 +01:00 committed by GitHub
parent a70712fce4
commit f1d15aee4b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 1 deletions

View File

@ -279,7 +279,10 @@
:redo-changes (vec changes)
:undo-changes []}))
(if (:repaired msg)
(rx/of (ntf/info (tr "workspace.notifications.file-repaired")))
(rx/of (ntf/show {:content (tr "workspace.notifications.file-repaired")
:type :toast
:level :info
:timeout nil}))
(rx/empty))))))
(defn handle-file-deleted

View File

@ -42,6 +42,8 @@
state (ptk/update show {})]
(t/is (= [::dch/commit ::ntf/show] types))
(t/is (= :info (get-in state [:notification :level])))
(t/is (nil? (get-in state [:notification :timeout]))
"the toast stays until the user closes it")
(t/is (= (i18n/tr "workspace.notifications.file-repaired")
(get-in state [:notification :content])))))