widget: Add ProvidesMessage interface

Consists of 3 functions
* Store: Access to MessageStore type
* SelectedAccount: Access to Account widget that the target widget
belongs to
* SelectedMessage: Current message (selected in msglist or the one we
are viewing)

Signed-off-by: Kevin Kuehler <keur@ocf.berkeley.edu>
This commit is contained in:
Kevin Kuehler 2019-06-01 22:15:04 -07:00 committed by Drew DeVault
parent 2be985fecb
commit 753adb9069
10 changed files with 93 additions and 18 deletions
commands/account

View file

@ -24,7 +24,7 @@ func ViewMessage(aerc *widgets.Aerc, args []string) error {
if msg == nil {
return nil
}
viewer := widgets.NewMessageViewer(aerc.Config(), store, msg)
viewer := widgets.NewMessageViewer(acct, aerc.Config(), store, msg)
aerc.NewTab(viewer, msg.Envelope.Subject)
return nil
}