Skip to content

Commit

Permalink
Double the duration of error toasts
Browse files Browse the repository at this point in the history
This gives users more time to read them.
  • Loading branch information
stefanhaller committed Jan 14, 2024
1 parent cb00561 commit 541a039
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/gui/status/status_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}()
Expand Down

0 comments on commit 541a039

Please sign in to comment.