summaryrefslogtreecommitdiff
path: root/widgets/msglist.go
diff options
context:
space:
mode:
Diffstat (limited to 'widgets/msglist.go')
-rw-r--r--widgets/msglist.go4
1 files changed, 1 insertions, 3 deletions
diff --git a/widgets/msglist.go b/widgets/msglist.go
index ec14e79..399ed72 100644
--- a/widgets/msglist.go
+++ b/widgets/msglist.go
@@ -403,9 +403,7 @@ func (ml *MessageList) Empty() bool {
}
func (ml *MessageList) Selected() *models.MessageInfo {
- store := ml.Store()
- uids := store.Uids()
- return store.Messages[uids[len(uids)-ml.store.SelectedIndex()-1]]
+ return ml.Store().Selected()
}
func (ml *MessageList) Select(index int) {