Count recent messages in maildir exists total too

This commit is contained in:
Jeffas 2020-03-02 20:00:14 +00:00 committed by Drew DeVault
parent ae7595e945
commit 08eabef17d
1 changed files with 1 additions and 1 deletions

View File

@ -136,7 +136,6 @@ func (w *Worker) getDirectoryInfo(name string) *models.DirectoryInfo {
w.worker.Logger.Printf("could not get uids: %v", err)
return dirInfo
}
dirInfo.Exists = len(uids)
recent, err := dir.UnseenCount()
if err != nil {
@ -166,6 +165,7 @@ func (w *Worker) getDirectoryInfo(name string) *models.DirectoryInfo {
}
}
dirInfo.Unseen += dirInfo.Recent
dirInfo.Exists = len(uids) + recent
return dirInfo
}