diff options
author | Koni Marti <koni.marti@gmail.com> | 2022-10-03 23:56:07 +0200 |
---|---|---|
committer | Robin Jarry <robin@jarry.cc> | 2022-10-04 09:44:04 +0200 |
commit | d3b62dd3b0fe6f5f1fb52e4fa9247cf9b27cbb3c (patch) | |
tree | 4bed5ce3176282ae72664b31bb1f33d75f76ba76 /commands/msg | |
parent | e4d418eed15858d6dcae70e73b8a6c3e4439b5bc (diff) | |
download | aerc-d3b62dd3b0fe6f5f1fb52e4fa9247cf9b27cbb3c.tar.gz |
view: add peek flag and propagate
Add a peek flag -p to the view commands to open the message viewer
without setting the "seen" flag. If the flag is set, it would ignore the
"auto-mark-read" config.
The SetSeen flag will be propagated in case the message viewer moves on
to other messages, i.e. with the delete or archive commands.
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.go | 2 | ||||
-rw-r--r-- | commands/msg/delete.go | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/commands/msg/archive.go b/commands/msg/archive.go index 2935991c..d485fd3d 100644 --- a/commands/msg/archive.go +++ b/commands/msg/archive.go @@ -120,7 +120,7 @@ func (Archive) Execute(aerc *widgets.Aerc, args []string) error { acct.Messages().Invalidate() return } - lib.NewMessageStoreView(next, acct.UiConfig().AutoMarkRead, + lib.NewMessageStoreView(next, mv.MessageView().SeenFlagSet(), store, aerc.Crypto, aerc.DecryptKeys, func(view lib.MessageView, err error) { if err != nil { diff --git a/commands/msg/delete.go b/commands/msg/delete.go index 57cef34d..a3d024a7 100644 --- a/commands/msg/delete.go +++ b/commands/msg/delete.go @@ -63,7 +63,7 @@ func (Delete) Execute(aerc *widgets.Aerc, args []string) error { acct.Messages().Invalidate() return } - lib.NewMessageStoreView(next, acct.UiConfig().AutoMarkRead, + lib.NewMessageStoreView(next, mv.MessageView().SeenFlagSet(), store, aerc.Crypto, aerc.DecryptKeys, func(view lib.MessageView, err error) { if err != nil { |