aboutsummaryrefslogtreecommitdiffstats
path: root/worker/notmuch
diff options
context:
space:
mode:
authorTim Culverhouse <tim@timculverhouse.com>2023-04-16 09:53:44 -0500
committerRobin Jarry <robin@jarry.cc>2023-04-22 22:40:12 +0200
commit5b0a98b8c936532fa5444b1cabf53d7c929d19c1 (patch)
treeb04415f6120d944cd74c45464a771d064cdd4305 /worker/notmuch
parentf13fbe7a27756c63d85f40c15320664d634f59e2 (diff)
downloadaerc-5b0a98b8c936532fa5444b1cabf53d7c929d19c1.tar.gz
directory: use directory to store rue counts
Store the Directory RUE counts on the Directory data model. Use DirectoryInfo messages to update the Directory model. Access Directories via the dirlist instead of via the msgstore. Remove unused fields on DirectoryInfo, all backends now give accurate counts. Move refetch logic into dirlist Signed-off-by: Tim Culverhouse <tim@timculverhouse.com> Acked-by: Robin Jarry<robin@jarry.cc>
Diffstat (limited to 'worker/notmuch')
-rw-r--r--worker/notmuch/worker.go7
1 files changed, 2 insertions, 5 deletions
diff --git a/worker/notmuch/worker.go b/worker/notmuch/worker.go
index 199eb64f..b25a8786 100644
--- a/worker/notmuch/worker.go
+++ b/worker/notmuch/worker.go
@@ -273,16 +273,13 @@ func (w *worker) handleListDirectories(msg *types.ListDirectories) error {
func (w *worker) getDirectoryInfo(name string, query string) *models.DirectoryInfo {
dirInfo := &models.DirectoryInfo{
- Name: name,
- Flags: []string{},
- ReadOnly: false,
+ Name: name,
// total messages
Exists: 0,
// new messages since mailbox was last opened
Recent: 0,
// total unread
- Unseen: 0,
- AccurateCounts: true,
+ Unseen: 0,
}
count, err := w.db.QueryCountMessages(query)