From 66b68f35b3f3f3b97ec9951397fd75afeb0d0995 Mon Sep 17 00:00:00 2001 From: Reto Brunner Date: Sat, 15 Feb 2020 14:14:43 +0100 Subject: dirlist: actually honor the DirInfo Currently the dirlist ignores the counts provided by the dirInfo. However some of the workers can actually provide accurate counts much quicker than if we count the flags. Eventually we will also want to enable displaying counts for background folders, where the brute force counting won't work as none of the headers are fetched yet. This commit models it in an opt-in manner, if the flag isn't set then we still count the messages manually. --- models/models.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'models') diff --git a/models/models.go b/models/models.go index 8d254a16..7654cf02 100644 --- a/models/models.go +++ b/models/models.go @@ -50,6 +50,9 @@ type DirectoryInfo struct { // The number of unread messages Unseen int + + // set to true if the value counts are accurate + AccurateCounts bool } // A MessageInfo holds information about the structure of a message -- cgit