From 7c89143c709e58f22a4939886ccb15bd639eec17 Mon Sep 17 00:00:00 2001 From: Ben Fiedler Date: Thu, 23 Apr 2020 03:56:28 +0200 Subject: Use aerc.PushError where appropriate Forgot an unused import, to save you the hassle here is v2. --- widgets/account-wizard.go | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'widgets/account-wizard.go') diff --git a/widgets/account-wizard.go b/widgets/account-wizard.go index d7b46b9e..e9bd8438 100644 --- a/widgets/account-wizard.go +++ b/widgets/account-wizard.go @@ -10,7 +10,6 @@ import ( "path" "strconv" "strings" - "time" "github.com/gdamore/tcell" "github.com/go-ini/ini" @@ -415,8 +414,7 @@ func (wizard *AccountWizard) ConfigureTemporaryAccount(temporary bool) { func (wizard *AccountWizard) errorFor(d ui.Interactive, err error) { if d == nil { - wizard.aerc.PushStatus(" "+err.Error(), 10*time.Second). - Color(tcell.ColorDefault, tcell.ColorRed) + wizard.aerc.PushError(" "+err.Error()) wizard.Invalidate() return } @@ -431,8 +429,7 @@ func (wizard *AccountWizard) errorFor(d ui.Interactive, err error) { wizard.step = step wizard.focus = focus wizard.Focus(true) - wizard.aerc.PushStatus(" "+err.Error(), 10*time.Second). - Color(tcell.ColorDefault, tcell.ColorRed) + wizard.aerc.PushError(" "+err.Error()) wizard.Invalidate() return } @@ -543,8 +540,7 @@ func (wizard *AccountWizard) finish(tutorial bool) { term.OnClose = func(err error) { wizard.aerc.RemoveTab(term) if err != nil { - wizard.aerc.PushStatus(" "+err.Error(), 10*time.Second). - Color(tcell.ColorDefault, tcell.ColorRed) + wizard.aerc.PushError(" "+err.Error()) } } } -- cgit