aboutsummaryrefslogtreecommitdiffstats
path: root/worker/notmuch/eventhandlers.go
diff options
context:
space:
mode:
authorKirill Chibisov <contact@kchibisov.com>2023-05-13 23:13:42 +0300
committerRobin Jarry <robin@jarry.cc>2023-08-05 00:07:21 +0200
commit2788078187c21e1713cbb86368ea4d91b2823bae (patch)
treeed2f6ce815e10baa368329501837409a4fab99b3 /worker/notmuch/eventhandlers.go
parent4a8ae421690b915db9b2917b9e9df9d66cc910c6 (diff)
downloadaerc-2788078187c21e1713cbb86368ea4d91b2823bae.tar.gz
notmuch: add option to provide path for account
Add the "maildir-account-path" account configuration option to select the account relative to the "maildir-store" to have traditional maildir one tab per account behavior with notmuch. Signed-off-by: Kirill Chibisov <contact@kchibisov.com> Acked-by: Robin Jarry <robin@jarry.cc> Tested-by: Bence Ferdinandy <bence@ferdinandy.com>
Diffstat (limited to 'worker/notmuch/eventhandlers.go')
-rw-r--r--worker/notmuch/eventhandlers.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/worker/notmuch/eventhandlers.go b/worker/notmuch/eventhandlers.go
index ca92d7eb..a6ab7668 100644
--- a/worker/notmuch/eventhandlers.go
+++ b/worker/notmuch/eventhandlers.go
@@ -5,6 +5,7 @@ package notmuch
import (
"fmt"
+ "path/filepath"
"strconv"
"git.sr.ht/~rjarry/aerc/worker/types"
@@ -27,7 +28,8 @@ func (w *worker) handleUpdateDirCounts() error {
return err
}
for name := range folders {
- query := fmt.Sprintf("folder:%s", strconv.Quote(name))
+ folder := filepath.Join(w.maildirAccountPath, name)
+ query := fmt.Sprintf("folder:%s", strconv.Quote(folder))
w.w.PostMessage(&types.DirectoryInfo{
Info: w.getDirectoryInfo(name, query),
}, nil)