summaryrefslogtreecommitdiff
path: root/widgets/msglist.go
diff options
context:
space:
mode:
Diffstat (limited to 'widgets/msglist.go')
-rw-r--r--widgets/msglist.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/widgets/msglist.go b/widgets/msglist.go
index 395fb54..c1bf0f4 100644
--- a/widgets/msglist.go
+++ b/widgets/msglist.go
@@ -93,8 +93,14 @@ func (ml *MessageList) Draw(ctx *ui.Context) {
counter := len(store.Uids())
for i := 0; i < len(threads); i++ {
+ var j = 0
+ if ml.conf.Ui.MsgListOrdAscending {
+ j = i
+ } else {
+ j = len(threads) - i - 1
+ }
var lastSubject string
- threads[i].Walk(func(t *types.Thread, _ int, currentErr error) error {
+ threads[j].Walk(func(t *types.Thread, _ int, currentErr error) error {
if currentErr != nil {
return currentErr
}