aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/aerc.go
diff options
context:
space:
mode:
authorReto Brunner <reto@labrat.space>2020-05-27 07:52:13 +0200
committerReto Brunner <reto@labrat.space>2020-05-27 08:11:40 +0200
commitf06d683688e3d2139b14f67b7e349089e7200bf4 (patch)
treeeee331112cbcfeafdb8cd6ba126d9e51ed72b10a /widgets/aerc.go
parent0f78f06610c0e8887aba2ae50e99b86477a384b3 (diff)
downloadaerc-f06d683688e3d2139b14f67b7e349089e7200bf4.tar.gz
Remove duration from the status methods
We always set 10 seconds anyhow, might as well do that without repeating ourselfs.
Diffstat (limited to 'widgets/aerc.go')
-rw-r--r--widgets/aerc.go20
1 files changed, 10 insertions, 10 deletions
diff --git a/widgets/aerc.go b/widgets/aerc.go
index 57d6cef9..47d7cc29 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, expiry time.Duration) *StatusMessage {
- return aerc.statusline.Push(text, expiry)
+func (aerc *Aerc) PushStatus(text string) *StatusMessage {
+ return aerc.statusline.Push(text, 10*time.Second)
}
-func (aerc *Aerc) PushError(text string, expiry time.Duration) *StatusMessage {
- return aerc.statusline.PushError(text, expiry)
+func (aerc *Aerc) PushError(text string) *StatusMessage {
+ return aerc.statusline.PushError(text, 10*time.Second)
}
-func (aerc *Aerc) PushSuccess(text string, expiry time.Duration) *StatusMessage {
- return aerc.statusline.PushSuccess(text, expiry)
+func (aerc *Aerc) PushSuccess(text string) *StatusMessage {
+ return aerc.statusline.PushSuccess(text, 10*time.Second)
}
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(), 10*time.Second)
+ aerc.PushError(" " + err.Error())
}
err = aerc.cmd(parts)
if err != nil {
- aerc.PushError(" "+err.Error(), 10*time.Second)
+ aerc.PushError(" " + err.Error())
}
// 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(), 10*time.Second)
+ aerc.PushError(" " + err.Error())
}
}, 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(), 10*time.Second)
+ aerc.PushError(" " + err.Error())
}
}, func(cmd string) []string {
return nil // TODO: completions