From 08eabef17d8b8f984e4ba796579bc8ef9cc11de9 Mon Sep 17 00:00:00 2001 From: Jeffas Date: Mon, 2 Mar 2020 20:00:14 +0000 Subject: [PATCH] Count recent messages in maildir exists total too --- worker/maildir/worker.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/worker/maildir/worker.go b/worker/maildir/worker.go index 2f96e6f..34d73f8 100644 --- a/worker/maildir/worker.go +++ b/worker/maildir/worker.go @@ -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 }