diff options
Diffstat (limited to 'commands/msg/recall.go')
-rw-r--r-- | commands/msg/recall.go | 25 |
1 files changed, 5 insertions, 20 deletions
diff --git a/commands/msg/recall.go b/commands/msg/recall.go index c095caf1..e7579ca1 100644 --- a/commands/msg/recall.go +++ b/commands/msg/recall.go @@ -84,10 +84,6 @@ func (Recall) Execute(aerc *widgets.Aerc, args []string) error { worker := composer.Worker() uids := []uint32{msgInfo.Uid} - if acct.SelectedDirectory() != acct.AccountConfig().Postpone { - return - } - deleteMessage := func() { worker.PostAction(&types.DeleteMessages{ Uids: uids, @@ -101,23 +97,8 @@ func (Recall) Execute(aerc *widgets.Aerc, args []string) error { }) } - if composer.Sent() { + if composer.Sent() || composer.Postponed() { deleteMessage() - } else { - confirm := widgets.NewSelectorDialog( - "Delete recalled message?", - "If you proceed, the recalled message will be deleted.", - []string{"Cancel", "Proceed"}, 0, aerc.SelectedAccountUiConfig(), - func(option string, err error) { - aerc.CloseDialog() - switch option { - case "Proceed": - deleteMessage() - default: - } - }, - ) - aerc.AddDialog(confirm) } }) } @@ -183,6 +164,10 @@ func (Recall) Execute(aerc *widgets.Aerc, args []string) error { }) } + if force { + composer.SetRecalledFrom(acct.SelectedDirectory()) + } + // focus the terminal since the header fields are likely already done composer.FocusTerminal() addTab(composer) |