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/eventhandlers.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'worker/notmuch/eventhandlers.go') 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 { -- cgit