From f81e4bd41c3ba9427390eadfc5133ed8daada6ab Mon Sep 17 00:00:00 2001 From: Kevin Kuehler Date: Wed, 17 Jul 2019 00:35:50 -0700 Subject: Implement :filter, :clear Signed-off-by: Kevin Kuehler --- commands/account/cf.go | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'commands/account/cf.go') diff --git a/commands/account/cf.go b/commands/account/cf.go index 6c928ea..2ebc294 100644 --- a/commands/account/cf.go +++ b/commands/account/cf.go @@ -34,14 +34,20 @@ func (_ ChangeFolder) Execute(aerc *widgets.Aerc, args []string) error { if acct == nil { return errors.New("No account selected") } + store := acct.Store() + if store == nil { + return errors.New("Cannot perform action. Messages still loading") + } previous := acct.Directories().Selected() if args[1] == "-" { if dir, ok := history[acct.Name()]; ok { + store.ApplyClear() acct.Directories().Select(dir) } else { return errors.New("No previous folder to return to") } } else { + store.ApplyClear() acct.Directories().Select(args[1]) } history[acct.Name()] = previous -- cgit v1.2.3