about summary refs log tree commit diff stats
path: root/commands/msg
diff options
context:
space:
mode:
authorReto Brunner <reto@labrat.space>2020-09-21 20:43:22 +0200
committerReto Brunner <reto@labrat.space>2020-09-21 20:43:22 +0200
commit8bf100f7b46bdafc83776e7c6177803a82b2eb17 (patch)
tree679e0a29a28aff6d4b97717c3f5ea78c6ff80705 /commands/msg
parent4f40eecef8a96f8b564010e62b67fbe9abe5b1a6 (diff)
downloadaerc-8bf100f7b46bdafc83776e7c6177803a82b2eb17.tar.gz
reply: don't override the answered flag if we didn't send
Aerc just sent the true / false update regardless, meaning if someone already
replied to a mail, then drafted yet another mail to the same parent the flag
would vanish. This commit fixes this behaviour.
Diffstat (limited to 'commands/msg')
-rw-r--r--commands/msg/reply.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/commands/msg/reply.go b/commands/msg/reply.go
index 3c8016e..bde9194 100644
--- a/commands/msg/reply.go
+++ b/commands/msg/reply.go
@@ -181,7 +181,9 @@ func (reply) Execute(aerc *widgets.Aerc, args []string) error {
 		})
 
 		composer.OnClose(func(c *widgets.Composer) {
-			store.Answered([]uint32{msg.Uid}, c.Sent(), nil)
+			if c.Sent() {
+				store.Answered([]uint32{msg.Uid}, true, nil)
+			}
 		})
 
 		return nil