From 4cf5ad68afd80f27512c464843b0d917182ef0c2 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Fri, 27 Mar 2020 13:19:26 +0100 Subject: plugins/base: always show INBOX first --- plugins/base/imap.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/plugins/base/imap.go b/plugins/base/imap.go index 760138b..14409eb 100755 --- a/plugins/base/imap.go +++ b/plugins/base/imap.go @@ -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 -- cgit v1.2.3