aboutsummaryrefslogtreecommitdiff
path: root/commands
diff options
context:
space:
mode:
Diffstat (limited to 'commands')
-rw-r--r--commands/msg/archive.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/commands/msg/archive.go b/commands/msg/archive.go
index 11752f7..da4c421 100644
--- a/commands/msg/archive.go
+++ b/commands/msg/archive.go
@@ -26,12 +26,13 @@ func Archive(aerc *widgets.Aerc, args []string) error {
if len(args) != 2 {
return errors.New("Usage: archive <flat|year|month>")
}
- acct := aerc.SelectedAccount()
+ widget := aerc.SelectedTab().(widgets.ProvidesMessage)
+ acct := widget.SelectedAccount()
if acct == nil {
return errors.New("No account selected")
}
- msg := acct.Messages().Selected()
- store := acct.Messages().Store()
+ msg := widget.SelectedMessage()
+ store := widget.Store()
archiveDir := acct.AccountConfig().Archive
acct.Messages().Next()