From e4d418eed15858d6dcae70e73b8a6c3e4439b5bc Mon Sep 17 00:00:00 2001 From: Koni Marti Date: Mon, 3 Oct 2022 23:56:06 +0200 Subject: viewer: option to not mark message as seen Add option to open a message in the message viewer without setting the seen flag. Enables the message viewer to be used as a preview pane without changing the message flags unintentionally. Before, the message viewer would set the seen flag by default. The IMAP backend will now always fetch the message body with the peek option enabled (same as we fetch the headers). An "auto-mark-read" option is added to the ui config which is set to true by default. If set the false, the seen flag is not set by the message viewer. Co-authored-by: "James Cook" Signed-off-by: Koni Marti Acked-by: Robin Jarry --- widgets/msglist.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'widgets/msglist.go') diff --git a/widgets/msglist.go b/widgets/msglist.go index ba09a8ec..74308ccb 100644 --- a/widgets/msglist.go +++ b/widgets/msglist.go @@ -308,8 +308,8 @@ func (ml *MessageList) MouseEvent(localX int, localY int, event tcell.Event) { if msg == nil { return } - lib.NewMessageStoreView(msg, store, ml.aerc.Crypto, - ml.aerc.DecryptKeys, + lib.NewMessageStoreView(msg, acct.UiConfig().AutoMarkRead, + store, ml.aerc.Crypto, ml.aerc.DecryptKeys, func(view lib.MessageView, err error) { if err != nil { ml.aerc.PushError(err.Error()) -- cgit