aboutsummaryrefslogtreecommitdiffstats
path: root/commands/msg/utils.go
diff options
context:
space:
mode:
Diffstat (limited to 'commands/msg/utils.go')
-rw-r--r--commands/msg/utils.go17
1 files changed, 10 insertions, 7 deletions
diff --git a/commands/msg/utils.go b/commands/msg/utils.go
index ae255351..cad0f82e 100644
--- a/commands/msg/utils.go
+++ b/commands/msg/utils.go
@@ -18,12 +18,7 @@ func newHelper(aerc *widgets.Aerc) *helper {
}
func (h *helper) markedOrSelectedUids() ([]uint32, error) {
- msgs, err := commands.MarkedOrSelected(h.msgProvider)
- if err != nil {
- return nil, err
- }
- uids := commands.UidsFromMessageInfos(msgs)
- return uids, nil
+ return commands.MarkedOrSelected(h.msgProvider)
}
func (h *helper) store() (*lib.MessageStore, error) {
@@ -43,5 +38,13 @@ func (h *helper) account() (*widgets.AccountView, error) {
}
func (h *helper) messages() ([]*models.MessageInfo, error) {
- return commands.MarkedOrSelected(h.msgProvider)
+ uid, err := commands.MarkedOrSelected(h.msgProvider)
+ if err != nil {
+ return nil, err
+ }
+ store, err := h.store()
+ if err != nil {
+ return nil, err
+ }
+ return commands.MsgInfoFromUids(store, uid)
}