diff options
Diffstat (limited to 'widgets')
-rw-r--r-- | widgets/account.go | 1 | ||||
-rw-r--r-- | widgets/msglist.go | 8 |
2 files changed, 8 insertions, 1 deletions
diff --git a/widgets/account.go b/widgets/account.go index 6e03160..75373aa 100644 --- a/widgets/account.go +++ b/widgets/account.go @@ -294,6 +294,7 @@ func (acct *AccountView) onMessage(msg types.WorkerMessage) { } else { store = lib.NewMessageStore(acct.worker, msg.Info, acct.GetSortCriteria(), + acct.UiConfig().MsgListOrdAscending, acct.UiConfig().ThreadingEnabled, acct.UiConfig().ForceClientThreads, func(msg *models.MessageInfo) { 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 } |