1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-03-19 21:28:28 +02:00

Double the duration of error toasts

This gives users more time to read them.
This commit is contained in:
Stefan Haller 2024-01-14 17:31:27 +01:00
parent 83337d9fa8
commit f133224683

View File

@ -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)
}()