aboutsummaryrefslogtreecommitdiffstats
path: root/commands/msg
diff options
context:
space:
mode:
authorKoni Marti <koni.marti@gmail.com>2022-10-03 23:56:06 +0200
committerRobin Jarry <robin@jarry.cc>2022-10-04 09:43:58 +0200
commite4d418eed15858d6dcae70e73b8a6c3e4439b5bc (patch)
tree58f1bc0b216965415074fa77c6503594771ea080 /commands/msg
parent4c371170c57d39399a924bd4d27d67226a9a7f39 (diff)
downloadaerc-e4d418eed15858d6dcae70e73b8a6c3e4439b5bc.tar.gz
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" <falsifian@falsifian.org> Signed-off-by: Koni Marti <koni.marti@gmail.com> Acked-by: Robin Jarry <robin@jarry.cc>
Diffstat (limited to 'commands/msg')
-rw-r--r--commands/msg/archive.go3
-rw-r--r--commands/msg/delete.go3
-rw-r--r--commands/msg/recall.go3
3 files changed, 6 insertions, 3 deletions
diff --git a/commands/msg/archive.go b/commands/msg/archive.go
index f7baff01..2935991c 100644
--- a/commands/msg/archive.go
+++ b/commands/msg/archive.go
@@ -120,7 +120,8 @@ func (Archive) Execute(aerc *widgets.Aerc, args []string) error {
acct.Messages().Invalidate()
return
}
- lib.NewMessageStoreView(next, store, aerc.Crypto, aerc.DecryptKeys,
+ lib.NewMessageStoreView(next, acct.UiConfig().AutoMarkRead,
+ store, aerc.Crypto, aerc.DecryptKeys,
func(view lib.MessageView, err error) {
if err != nil {
aerc.PushError(err.Error())
diff --git a/commands/msg/delete.go b/commands/msg/delete.go
index ee682a47..57cef34d 100644
--- a/commands/msg/delete.go
+++ b/commands/msg/delete.go
@@ -63,7 +63,8 @@ func (Delete) Execute(aerc *widgets.Aerc, args []string) error {
acct.Messages().Invalidate()
return
}
- lib.NewMessageStoreView(next, store, aerc.Crypto, aerc.DecryptKeys,
+ lib.NewMessageStoreView(next, acct.UiConfig().AutoMarkRead,
+ store, aerc.Crypto, aerc.DecryptKeys,
func(view lib.MessageView, err error) {
if err != nil {
aerc.PushError(err.Error())
diff --git a/commands/msg/recall.go b/commands/msg/recall.go
index 5fc3a265..4ef505ef 100644
--- a/commands/msg/recall.go
+++ b/commands/msg/recall.go
@@ -137,7 +137,8 @@ func (Recall) Execute(aerc *widgets.Aerc, args []string) error {
})
}
- lib.NewMessageStoreView(msgInfo, store, aerc.Crypto, aerc.DecryptKeys,
+ lib.NewMessageStoreView(msgInfo, acct.UiConfig().AutoMarkRead,
+ store, aerc.Crypto, aerc.DecryptKeys,
func(msg lib.MessageView, err error) {
if err != nil {
aerc.PushError(err.Error())