about summary refs log tree commit diff stats
path: root/commands/account/view.go
diff options
context:
space:
mode:
Diffstat (limited to 'commands/account/view.go')
-rw-r--r--commands/account/view.go8
1 files changed, 6 insertions, 2 deletions
diff --git a/commands/account/view.go b/commands/account/view.go
index aab9052..d1b90ce 100644
--- a/commands/account/view.go
+++ b/commands/account/view.go
@@ -3,6 +3,7 @@ package account
 import (
 	"errors"
 
+	"git.sr.ht/~sircmpwn/aerc/lib"
 	"git.sr.ht/~sircmpwn/aerc/widgets"
 )
 
@@ -37,7 +38,10 @@ func (ViewMessage) Execute(aerc *widgets.Aerc, args []string) error {
 	if deleted {
 		return nil
 	}
-	viewer := widgets.NewMessageViewer(acct, aerc.Config(), store, msg)
-	aerc.NewTab(viewer, msg.Envelope.Subject)
+	lib.NewMessageStoreView(msg, store, aerc.DecryptKeys,
+		func(view lib.MessageView) {
+			viewer := widgets.NewMessageViewer(acct, aerc.Config(), view)
+			aerc.NewTab(viewer, msg.Envelope.Subject)
+		})
 	return nil
 }