diff options
author | Moritz Poldrack <git@moritz.sh> | 2022-06-22 12:19:38 +0200 |
---|---|---|
committer | Robin Jarry <robin@jarry.cc> | 2022-06-24 21:43:40 +0200 |
commit | 15a07e589201a3c748835747760a1b41e054ccc0 (patch) | |
tree | 0e8e3efb899b2baf876db2a6073422306d279ad3 /widgets | |
parent | 8f9bb2b289af34581b43e0777b2376ab0617aecd (diff) | |
download | aerc-15a07e589201a3c748835747760a1b41e054ccc0.tar.gz |
pgp: add note for encrypted messages that are not signed
Since there is a prominent checkmark for encrypted messages, it might
not be entirely clear that the contents have not been signed.
Signed-off-by: Moritz Poldrack <git@moritz.sh>
Tested-by: Tim Culverhouse <tim@timculverhouse.com>
Diffstat (limited to 'widgets')
-rw-r--r-- | widgets/pgpinfo.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/widgets/pgpinfo.go b/widgets/pgpinfo.go index 8dc05707..05e20539 100644 --- a/widgets/pgpinfo.go +++ b/widgets/pgpinfo.go @@ -44,12 +44,17 @@ func (p *PGPInfo) DrawSignature(ctx *ui.Context) { } func (p *PGPInfo) DrawEncryption(ctx *ui.Context, y int) { + warningStyle := p.uiConfig.GetStyle(config.STYLE_WARNING) validStyle := p.uiConfig.GetStyle(config.STYLE_SUCCESS) defaultStyle := p.uiConfig.GetStyle(config.STYLE_DEFAULT) x := ctx.Printf(0, y, validStyle, "✓ Encrypted ") x += ctx.Printf(x, y, defaultStyle, "To %s (%8X) ", p.details.DecryptedWith, p.details.DecryptedWithKeyId) + if !p.details.IsSigned { + x += ctx.Printf(x, y, warningStyle, + "(message not signed!)") + } } func (p *PGPInfo) Draw(ctx *ui.Context) { |