diff options
author | Ray Ganardi <ray@ganardi.xyz> | 2020-05-19 13:06:46 +0200 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2020-05-25 09:30:20 -0400 |
commit | 58db517c8d79c7fd8897d8ab5d5cf9c2de67a071 (patch) | |
tree | 775b2d74bda2ea10795b9dffa60afb66c36a90b8 /commands/msgview | |
parent | 83e7c7661dfe42e75641d764d713d144c2d7c6ce (diff) | |
download | aerc-58db517c8d79c7fd8897d8ab5d5cf9c2de67a071.tar.gz |
pgp: fail gracefully from email decryption
Aerc panics when there's an error on email decryption.
Instead, an error message should be shown.
Diffstat (limited to 'commands/msgview')
-rw-r--r-- | commands/msgview/next.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/commands/msgview/next.go b/commands/msgview/next.go index c218ad53..978cf10f 100644 --- a/commands/msgview/next.go +++ b/commands/msgview/next.go @@ -38,7 +38,11 @@ func (NextPrevMsg) Execute(aerc *widgets.Aerc, args []string) error { return nil } lib.NewMessageStoreView(nextMsg, store, aerc.DecryptKeys, - func(view lib.MessageView) { + func(view lib.MessageView, err error) { + if err != nil { + aerc.PushError(err.Error()) + return + } nextMv := widgets.NewMessageViewer(acct, aerc.Config(), view) aerc.ReplaceTab(mv, nextMv, nextMsg.Envelope.Subject) }) |