aboutsummaryrefslogtreecommitdiffstats
path: root/commands
diff options
context:
space:
mode:
Diffstat (limited to 'commands')
-rw-r--r--commands/compose/send.go2
-rw-r--r--commands/msg/reply.go4
2 files changed, 6 insertions, 0 deletions
diff --git a/commands/compose/send.go b/commands/compose/send.go
index 36b9fd81..59ae5d0b 100644
--- a/commands/compose/send.go
+++ b/commands/compose/send.go
@@ -244,6 +244,7 @@ func (Send) Execute(aerc *widgets.Aerc, args []string) error {
case *types.Done:
aerc.PushStatus("Message sent.", 10*time.Second)
r.Close()
+ composer.SetSent()
composer.Close()
case *types.Error:
aerc.PushError(" " + msg.Error.Error())
@@ -256,6 +257,7 @@ func (Send) Execute(aerc *widgets.Aerc, args []string) error {
w.Close()
} else {
aerc.PushStatus("Message sent.", 10*time.Second)
+ composer.SetSent()
composer.Close()
}
}()
diff --git a/commands/msg/reply.go b/commands/msg/reply.go
index 8e0feef9..28ce245d 100644
--- a/commands/msg/reply.go
+++ b/commands/msg/reply.go
@@ -157,6 +157,10 @@ func (reply) Execute(aerc *widgets.Aerc, args []string) error {
tab.Content.Invalidate()
})
+ composer.OnClose(func(c *widgets.Composer) {
+ store.Answered([]uint32{msg.Uid}, c.Sent(), nil)
+ })
+
return nil
}