diff options
author | Stefan Haller <stefan@haller-berlin.de> | 2024-01-14 17:31:27 +0100 |
---|---|---|
committer | Stefan Haller <stefan@haller-berlin.de> | 2024-01-14 17:45:35 +0100 |
commit | f133224683f3f8828064e58dde718f130751e8d3 (patch) | |
tree | d3a0fcce63dd6afe154ec4ff2fb0666bcf238569 /pkg/gui/status | |
parent | 83337d9fa8ede87b42c5ac5133f5f8c1165ae329 (diff) |
Double the duration of error toasts
This gives users more time to read them.
Diffstat (limited to 'pkg/gui/status')
-rw-r--r-- | pkg/gui/status/status_manager.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/pkg/gui/status/status_manager.go b/pkg/gui/status/status_manager.go index f85036463..eb5b01d4a 100644 --- a/pkg/gui/status/status_manager.go +++ b/pkg/gui/status/status_manager.go @@ -60,7 +60,8 @@ func (self *StatusManager) AddToastStatus(message string, kind types.ToastKind) id := self.addStatus(message, "toast", kind) go func() { - time.Sleep(time.Second * 2) + delay := lo.Ternary(kind == types.ToastKindError, time.Second*4, time.Second*2) + time.Sleep(delay) self.removeStatus(id) }() |