diff options
author | Drew DeVault <sir@cmpwn.com> | 2020-05-28 10:32:32 -0400 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2020-05-28 10:32:32 -0400 |
commit | 76a91813d8dc0f0011202f8120fc197097f022aa (patch) | |
tree | ff4cd6581d3af0911954a37550602366d2bb0e2f /widgets/aerc.go | |
parent | b9af9b5fb1c4f226499ab9c56d3e24f2b9b2db24 (diff) | |
download | aerc-76a91813d8dc0f0011202f8120fc197097f022aa.tar.gz |
Revert "Remove duration from the status methods"
This reverts commit f06d683688e3d2139b14f67b7e349089e7200bf4.
Diffstat (limited to 'widgets/aerc.go')
-rw-r--r-- | widgets/aerc.go | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/widgets/aerc.go b/widgets/aerc.go index 47d7cc29..57d6cef9 100644 --- a/widgets/aerc.go +++ b/widgets/aerc.go @@ -386,16 +386,16 @@ func (aerc *Aerc) SetError(status string) *StatusMessage { return aerc.statusline.SetError(status) } -func (aerc *Aerc) PushStatus(text string) *StatusMessage { - return aerc.statusline.Push(text, 10*time.Second) +func (aerc *Aerc) PushStatus(text string, expiry time.Duration) *StatusMessage { + return aerc.statusline.Push(text, expiry) } -func (aerc *Aerc) PushError(text string) *StatusMessage { - return aerc.statusline.PushError(text, 10*time.Second) +func (aerc *Aerc) PushError(text string, expiry time.Duration) *StatusMessage { + return aerc.statusline.PushError(text, expiry) } -func (aerc *Aerc) PushSuccess(text string) *StatusMessage { - return aerc.statusline.PushSuccess(text, 10*time.Second) +func (aerc *Aerc) PushSuccess(text string, expiry time.Duration) *StatusMessage { + return aerc.statusline.PushSuccess(text, expiry) } func (aerc *Aerc) focus(item ui.Interactive) { @@ -424,11 +424,11 @@ func (aerc *Aerc) BeginExCommand(cmd string) { exline := NewExLine(aerc.conf, cmd, func(cmd string) { parts, err := shlex.Split(cmd) if err != nil { - aerc.PushError(" " + err.Error()) + aerc.PushError(" "+err.Error(), 10*time.Second) } err = aerc.cmd(parts) if err != nil { - aerc.PushError(" " + err.Error()) + aerc.PushError(" "+err.Error(), 10*time.Second) } // only add to history if this is an unsimulated command, // ie one not executed from a keybinding @@ -452,7 +452,7 @@ func (aerc *Aerc) RegisterPrompt(prompt string, cmd []string) { } err := aerc.cmd(cmd) if err != nil { - aerc.PushError(" " + err.Error()) + aerc.PushError(" "+err.Error(), 10*time.Second) } }, func(cmd string) []string { return nil // TODO: completions @@ -479,7 +479,7 @@ func (aerc *Aerc) RegisterChoices(choices []Choice) { } err := aerc.cmd(cmd) if err != nil { - aerc.PushError(" " + err.Error()) + aerc.PushError(" "+err.Error(), 10*time.Second) } }, func(cmd string) []string { return nil // TODO: completions |