Set AnsweredFlag on successful reply

This commit is contained in:
Srivathsan Murali 2020-05-25 16:59:48 +02:00 committed by Drew DeVault
parent a31d184ba5
commit b1eb7ad18d
11 changed files with 179 additions and 0 deletions
commands
compose
msg

View file

@ -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()
}
}()

View file

@ -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
}