From 3102ac3680ba5fcfb126894a7b7b950b07b6c735 Mon Sep 17 00:00:00 2001 From: Jeffas Date: Fri, 24 Apr 2020 11:42:22 +0200 Subject: Add recall command This command allows recalling the selected postponed email to edit in the composer. The command only allows recalling from the postpone directory. --- widgets/account.go | 4 ++++ widgets/compose.go | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'widgets') diff --git a/widgets/account.go b/widgets/account.go index a854fb6e..31384a5f 100644 --- a/widgets/account.go +++ b/widgets/account.go @@ -200,6 +200,10 @@ func (acct *AccountView) SelectedAccount() *AccountView { return acct } +func (acct *AccountView) SelectedDirectory() string { + return acct.dirlist.Selected() +} + func (acct *AccountView) SelectedMessage() (*models.MessageInfo, error) { if len(acct.msglist.Store().Uids()) == 0 { return nil, errors.New("no message selected") diff --git a/widgets/compose.go b/widgets/compose.go index 66877cc1..42819411 100644 --- a/widgets/compose.go +++ b/widgets/compose.go @@ -59,7 +59,7 @@ type Composer struct { } func NewComposer(aerc *Aerc, acct *AccountView, conf *config.AercConfig, - acct *config.AccountConfig, worker *types.Worker, template string, + acctConfig *config.AccountConfig, worker *types.Worker, template string, defaults map[string]string, original models.OriginalMail) (*Composer, error) { if defaults == nil { -- cgit