diff options
author | Moritz Poldrack <git@moritz.sh> | 2022-06-22 12:19:40 +0200 |
---|---|---|
committer | Robin Jarry <robin@jarry.cc> | 2022-06-24 21:44:05 +0200 |
commit | b7d8918bbd75502e7144a146dd3400a17a441c36 (patch) | |
tree | 87e4dcdb4ddbb892f6dd0b616b1e1814a9d9c910 /widgets/msgviewer.go | |
parent | ecf47542cb5ec5da7d699b36cf8b8af2cbf0a7a6 (diff) | |
download | aerc-b7d8918bbd75502e7144a146dd3400a17a441c36.zip |
pgp: add icon for unencrypted, unsigned messages if an icon is set
Signed-off-by: Moritz Poldrack <git@moritz.sh>
Tested-by: Tim Culverhouse <tim@timculverhouse.com>
Diffstat (limited to 'widgets/msgviewer.go')
-rw-r--r-- | widgets/msgviewer.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/widgets/msgviewer.go b/widgets/msgviewer.go index 0e6af5b..d88785c 100644 --- a/widgets/msgviewer.go +++ b/widgets/msgviewer.go @@ -93,9 +93,9 @@ func NewMessageViewer(acct *AccountView, {Strategy: ui.SIZE_EXACT, Size: ui.Const(headerHeight)}, } - if msg.MessageDetails() != nil { + if msg.MessageDetails() != nil || conf.Ui.IconUnencrypted != "" { height := 1 - if msg.MessageDetails().IsSigned && msg.MessageDetails().IsEncrypted { + if msg.MessageDetails() != nil && msg.MessageDetails().IsSigned && msg.MessageDetails().IsEncrypted { height = 2 } rows = append(rows, ui.GridSpec{Strategy: ui.SIZE_EXACT, Size: ui.Const(height)}) @@ -125,7 +125,7 @@ func NewMessageViewer(acct *AccountView, borderChar := acct.UiConfig().BorderCharHorizontal grid.AddChild(header).At(0, 0) - if msg.MessageDetails() != nil { + if msg.MessageDetails() != nil || conf.Ui.IconUnencrypted != "" { 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) |