aboutsummaryrefslogtreecommitdiffstats
path: root/worker/notmuch/lib
diff options
context:
space:
mode:
authorTim Culverhouse <tim@timculverhouse.com>2023-03-02 16:46:04 -0600
committerRobin Jarry <robin@jarry.cc>2023-03-07 16:37:02 +0100
commit3b405b3a70fea7bdb71126e93a554b774f1288c0 (patch)
tree317d0a6944a7b94d67116bdf1d872ce1da60f9d1 /worker/notmuch/lib
parentec6b552268bcdb8eca7a007df5ca15544342a6f3 (diff)
downloadaerc-3b405b3a70fea7bdb71126e93a554b774f1288c0.tar.gz
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 <tim@timculverhouse.com> Tested-by: Ben Lee-Cohen <ben@lee-cohen.com> Acked-by: Robin Jarry <robin@jarry.cc>
Diffstat (limited to 'worker/notmuch/lib')
-rw-r--r--worker/notmuch/lib/database.go5
1 files changed, 5 insertions, 0 deletions
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.