Browse Source

plugins/base: always show INBOX first

master
Simon Ser 4 years ago
parent
commit
4cf5ad68af
No known key found for this signature in database GPG Key ID: FDE7BE0E88F5E48
1 changed files with 6 additions and 0 deletions
  1. +6
    -0
      plugins/base/imap.go

+ 6
- 0
plugins/base/imap.go View File

@@ -54,6 +54,12 @@ func listMailboxes(conn *imapclient.Client) ([]MailboxInfo, error) {
}

sort.Slice(mailboxes, func(i, j int) bool {
if mailboxes[i].Name == "INBOX" {
return true
}
if mailboxes[j].Name == "INBOX" {
return false
}
return mailboxes[i].Name < mailboxes[j].Name
})
return mailboxes, nil


Loading…
Cancel
Save