aboutsummaryrefslogtreecommitdiff
path: root/lib/msgstore.go
diff options
context:
space:
mode:
authorStephen Brennan <stephen@brennan.io>2019-08-27 21:54:28 -0700
committerDrew DeVault <sir@cmpwn.com>2019-08-29 08:44:08 +0900
commitac99d9ed62644cf0259bdd79481b28c3fbcef650 (patch)
tree3c71dda62e9b2cd8f27d03d3af4edf6dbbae6e36 /lib/msgstore.go
parenta2c5233f71522c894b90388623959dcd4cd44256 (diff)
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.
Diffstat (limited to 'lib/msgstore.go')
-rw-r--r--lib/msgstore.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/msgstore.go b/lib/msgstore.go
index 1061c8e..169d51d 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