plugins/base: always show INBOX first
This commit is contained in:
parent
6395be6737
commit
4cf5ad68af
1 changed files with 6 additions and 0 deletions
|
@ -54,6 +54,12 @@ func listMailboxes(conn *imapclient.Client) ([]MailboxInfo, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
sort.Slice(mailboxes, func(i, j int) bool {
|
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[i].Name < mailboxes[j].Name
|
||||||
})
|
})
|
||||||
return mailboxes, nil
|
return mailboxes, nil
|
||||||
|
|
Loading…
Reference in a new issue