~sircmpwn/aerc

2257b29a821908b421f08767af52bbe50869fef6 — a3v 2 years ago e4104a8
Use sort.Stable for sorting displayed messages

With sort.Sort, sometimes two messages with the same timestamp will switch
places every time the message list is redrawn
1 files changed, 1 insertions(+), 1 deletions(-)

M widgets/msglist.go
M widgets/msglist.go => widgets/msglist.go +1 -1
@@ 96,7 96,7 @@ func (ml *MessageList) Draw(ctx *ui.Context) {
	)
	uids := store.Uids()
	sorter := msgSorter{uids: uids, store: store}
	sort.Sort(&sorter)
	sort.Stable(&sorter)

	for i := len(uids) - 1 - ml.scroll; i >= 0; i-- {
		uid := uids[i]