aboutsummaryrefslogtreecommitdiffstats
path: root/commands/msg/reply.go
diff options
context:
space:
mode:
authorRobin Jarry <robin@jarry.cc>2024-06-29 01:15:19 +0200
committerRobin Jarry <robin@jarry.cc>2024-08-03 20:19:37 +0200
commit954c812d840030f3013ef06621dd537c8b14b23d (patch)
treee1a3a7a0119c246f8969a64691e69c9b7abc0bfe /commands/msg/reply.go
parentcd92da0e893ab6741bb6d411434edbb03a570c7d (diff)
downloadaerc-954c812d840030f3013ef06621dd537c8b14b23d.tar.gz
reply: allow copying to current folder
Add a new copy-to-replied setting in accounts.conf to copy sent replies to the same folder than their replied message. Requested-by: Tristan Partin <tristan@partin.io> Signed-off-by: Robin Jarry <robin@jarry.cc> Tested-by: Tristan Partin <tristan@partin.io>
Diffstat (limited to 'commands/msg/reply.go')
-rw-r--r--commands/msg/reply.go7
1 files changed, 5 insertions, 2 deletions
diff --git a/commands/msg/reply.go b/commands/msg/reply.go
index acc0d6fa..e55b5d4b 100644
--- a/commands/msg/reply.go
+++ b/commands/msg/reply.go
@@ -165,10 +165,13 @@ func (r reply) Execute(args []string) error {
store := widget.Store()
noStore := store == nil
- if noStore && isMsgViewer {
+ switch {
+ case noStore && isMsgViewer:
app.PushWarning("No message store found: answered flag cannot be set")
- } else if noStore {
+ case noStore:
return errors.New("Cannot perform action. Messages still loading")
+ default:
+ original.Folder = store.Name
}
addTab := func() error {