diff options
author | Reto Brunner <reto@labrat.space> | 2020-08-08 11:38:38 +0200 |
---|---|---|
committer | Reto Brunner <reto@labrat.space> | 2020-08-10 08:00:34 +0200 |
commit | 2d7a8707257eec2b9f0ff41772cfd8dab4f1201e (patch) | |
tree | 257436ae151d923cf80aec0382f16b9fa03bbdae /widgets/account-wizard.go | |
parent | c3c982c3ec0f9702047e0e09d667bbd70a33103c (diff) | |
download | aerc-2d7a8707257eec2b9f0ff41772cfd8dab4f1201e.tar.gz |
show error if account view creation fails
This can happen for example if aerc is compiled without notmuch support but the
notmuch worker is requested.
Pushing a status message isn't good enough, as this gets overridden pretty
quickly if one has multiple accounts configured.
So we show a fullscreen error instead.
Diffstat (limited to 'widgets/account-wizard.go')
-rw-r--r-- | widgets/account-wizard.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/widgets/account-wizard.go b/widgets/account-wizard.go index 59f22e78..f47e97e1 100644 --- a/widgets/account-wizard.go +++ b/widgets/account-wizard.go @@ -534,8 +534,13 @@ func (wizard *AccountWizard) finish(tutorial bool) { } wizard.conf.Accounts = append(wizard.conf.Accounts, account) - view := NewAccountView(wizard.aerc, wizard.conf, &account, + view, err := NewAccountView(wizard.aerc, wizard.conf, &account, wizard.aerc.logger, wizard.aerc) + if err != nil { + wizard.aerc.NewTab(errorScreen(err.Error(), wizard.conf.Ui), + account.Name) + return + } wizard.aerc.accounts[account.Name] = view wizard.aerc.NewTab(view, account.Name) |