From ac99d9ed62644cf0259bdd79481b28c3fbcef650 Mon Sep 17 00:00:00 2001 From: Stephen Brennan Date: Tue, 27 Aug 2019 21:54:28 -0700 Subject: Fix out-of-order messages by sorting as we display Sometimes I observe out-of-order messages when using a maildir inbox. It appears that the UIDs for these messages are returned out of order by the MessageStore. In order for a maildir MessageStore to return messages in most recently received order, it must have already opened all messages and parsed the date to use as a sort key. Rather than implement that, simply sort messages by time as we display. This fix shows my emails in order. --- lib/msgstore.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/msgstore.go b/lib/msgstore.go index 1061c8e3..169d51d8 100644 --- a/lib/msgstore.go +++ b/lib/msgstore.go @@ -15,7 +15,7 @@ type MessageStore struct { Deleted map[uint32]interface{} DirInfo models.DirectoryInfo Messages map[uint32]*models.MessageInfo - // Ordered list of known UIDs + // List of known UIDs, order is not important uids []uint32 selected int -- cgit