From 3b405b3a70fea7bdb71126e93a554b774f1288c0 Mon Sep 17 00:00:00 2001 From: Tim Culverhouse Date: Thu, 2 Mar 2023 16:46:04 -0600 Subject: notmuch: use fswatcher to trigger directory count update Use fswatcher to watch the underlying notmuch db to trigger directory updates. Remove unused argument in the handleUpdateDirCounts function. Call this function when listing directories to initialize counts when starting aerc. Signed-off-by: Tim Culverhouse Tested-by: Ben Lee-Cohen Acked-by: Robin Jarry --- worker/notmuch/lib/database.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'worker/notmuch/lib') diff --git a/worker/notmuch/lib/database.go b/worker/notmuch/lib/database.go index 79bf5be3..a965bb62 100644 --- a/worker/notmuch/lib/database.go +++ b/worker/notmuch/lib/database.go @@ -62,6 +62,11 @@ func (db *DB) connect(writable bool) error { return nil } +// Returns the DB path +func (db *DB) Path() string { + return db.db.Path() +} + // withConnection calls callback on the DB object, cleaning up upon return. // the error returned is from the connection attempt, if not successful, // or from the callback otherwise. -- cgit