diff options
author | Koni Marti <koni.marti@gmail.com> | 2022-10-23 21:27:10 +0200 |
---|---|---|
committer | Robin Jarry <robin@jarry.cc> | 2022-11-09 21:15:22 +0100 |
commit | 20554d8460e96a408cfd779e1158dec78b639028 (patch) | |
tree | 2bd6f5f4b1e7d4205a4df1d56f7223e6f5bcd13a /widgets/compose.go | |
parent | f479ae8c6e550dade0f183da9d3d7760f406d806 (diff) | |
download | aerc-20554d8460e96a408cfd779e1158dec78b639028.tar.gz |
composer: add message preview
Add message preview to the composer. Add preview option to the review
window. Open the message in a message viewer before sending to check the
headers and attachments.
Implements: https://todo.sr.ht/~rjarry/aerc/86
Signed-off-by: Koni Marti <koni.marti@gmail.com>
Acked-by: Robin Jarry <robin@jarry.cc>
Diffstat (limited to 'widgets/compose.go')
-rw-r--r-- | widgets/compose.go | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/widgets/compose.go b/widgets/compose.go index c3f396bd..ca7c8b8f 100644 --- a/widgets/compose.go +++ b/widgets/compose.go @@ -681,13 +681,14 @@ func (c *Composer) PrepareHeader() (*mail.Header, error) { return nil, err } } - if !c.header.Has("Date") { - if c.acctConfig.SendAsUTC { - c.header.SetDate(time.Now().UTC()) - } else { - c.header.SetDate(time.Now()) - } + + // update the "Date" header every time PrepareHeader is called + if c.acctConfig.SendAsUTC { + c.header.SetDate(time.Now().UTC()) + } else { + c.header.SetDate(time.Now()) } + return c.header, nil } @@ -1244,6 +1245,7 @@ var reviewCommands = [][]string{ {":attach<space>", "Add attachment"}, {":detach<space>", "Remove attachment"}, {":postpone<enter>", "Postpone"}, + {":preview<enter>", "Preview message"}, {":abort<enter>", "Abort (discard message, no confirmation)"}, {":choose -o d discard abort -o p postpone postpone<enter>", "Abort or postpone"}, } |