diff options
author | Tim Culverhouse <tim@timculverhouse.com> | 2022-04-25 08:30:43 -0500 |
---|---|---|
committer | Robin Jarry <robin@jarry.cc> | 2022-04-27 09:46:11 +0200 |
commit | d09636ee0b9957ed60fc01224ddfbb03c4f4b7fa (patch) | |
tree | 5f0ec8c9ad11a0f638c25dbd896a518e983dc779 /widgets/msgviewer.go | |
parent | afe35839eddfaf43be0f791e97a926a15d91fc02 (diff) | |
download | aerc-d09636ee0b9957ed60fc01224ddfbb03c4f4b7fa.zip |
refactor: refactor pgp implementation
This commit refactors the internal PGP implementation to make way for
GPG integration.
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
Acked-by: Koni Marti <koni.marti@gmail.com>
Acked-by: Robin Jarry <robin@jarry.cc>
Diffstat (limited to 'widgets/msgviewer.go')
-rw-r--r-- | widgets/msgviewer.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/widgets/msgviewer.go b/widgets/msgviewer.go index 89cbc2c..c88c981 100644 --- a/widgets/msgviewer.go +++ b/widgets/msgviewer.go @@ -75,9 +75,9 @@ func NewMessageViewer(acct *AccountView, {Strategy: ui.SIZE_EXACT, Size: ui.Const(headerHeight)}, } - if msg.PGPDetails() != nil { + if msg.MessageDetails() != nil { height := 1 - if msg.PGPDetails().IsSigned && msg.PGPDetails().IsEncrypted { + if msg.MessageDetails().IsSigned && msg.MessageDetails().IsEncrypted { height = 2 } rows = append(rows, ui.GridSpec{Strategy: ui.SIZE_EXACT, Size: ui.Const(height)}) @@ -107,8 +107,8 @@ func NewMessageViewer(acct *AccountView, borderChar := acct.UiConfig().BorderCharHorizontal grid.AddChild(header).At(0, 0) - if msg.PGPDetails() != nil { - grid.AddChild(NewPGPInfo(msg.PGPDetails(), acct.UiConfig())).At(1, 0) + if msg.MessageDetails() != nil { + grid.AddChild(NewPGPInfo(msg.MessageDetails(), acct.UiConfig())).At(1, 0) grid.AddChild(ui.NewFill(borderChar, borderStyle)).At(2, 0) grid.AddChild(switcher).At(3, 0) } else { |