aboutsummaryrefslogtreecommitdiffstats
path: root/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'widgets')
-rw-r--r--widgets/msglist.go4
1 files changed, 1 insertions, 3 deletions
diff --git a/widgets/msglist.go b/widgets/msglist.go
index ec14e794..399ed724 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) {