aboutsummaryrefslogtreecommitdiffstats
path: root/worker/notmuch/eventhandlers.go
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/eventhandlers.go
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/eventhandlers.go')
-rw-r--r--worker/notmuch/eventhandlers.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/worker/notmuch/eventhandlers.go b/worker/notmuch/eventhandlers.go
index 7cd9c6fc..2b03d68b 100644
--- a/worker/notmuch/eventhandlers.go
+++ b/worker/notmuch/eventhandlers.go
@@ -12,15 +12,15 @@ import (
)
func (w *worker) handleNotmuchEvent(et eventType) error {
- switch ev := et.(type) {
+ switch et.(type) {
case *updateDirCounts:
- return w.handleUpdateDirCounts(ev)
+ return w.handleUpdateDirCounts()
default:
return errUnsupported
}
}
-func (w *worker) handleUpdateDirCounts(ev eventType) error {
+func (w *worker) handleUpdateDirCounts() error {
if w.store != nil {
folders, err := w.store.FolderMap()
if err != nil {