aerc

Working clone of aerc-mail.org
git clone git://git.danielmoch.com/aerc.git
Log | Files | Refs | README | LICENSE

commit 07138146a01d802e4d1b5a7d0ccf4601d89eeef8
parent db213fd0aed98a79ecb1be2c7b7d61c7d983bedf
Author: Drew DeVault <sir@cmpwn.com>
Date:   Tue, 14 May 2019 16:53:47 -0400

Force INBOX to be included in dirlist

Diffstat:
Mwidgets/dirlist.go | 11+++++++++++
1 file changed, 11 insertions(+), 0 deletions(-)

diff --git a/widgets/dirlist.go b/widgets/dirlist.go @@ -47,6 +47,17 @@ func (dirlist *DirectoryList) UpdateList(done func(dirs []string)) { case *types.Directory: dirs = append(dirs, msg.Name) case *types.Done: + // There is always an INBOX, RFC-guaranteed + // However, for some reason Dovecot doesn't always send it. + inbox := false + for _, dir := range dirs { + if dir == "INBOX" { + inbox = true + } + } + if !inbox { + dirs = append(dirs, "INBOX") + } sort.Strings(dirs) dirlist.dirs = dirs dirlist.spinner.Stop()