aboutsummaryrefslogtreecommitdiffstats
path: root/worker/notmuch/eventhandlers.go
diff options
context:
space:
mode:
Diffstat (limited to 'worker/notmuch/eventhandlers.go')
-rw-r--r--worker/notmuch/eventhandlers.go21
1 files changed, 9 insertions, 12 deletions
diff --git a/worker/notmuch/eventhandlers.go b/worker/notmuch/eventhandlers.go
index ab180467..38875060 100644
--- a/worker/notmuch/eventhandlers.go
+++ b/worker/notmuch/eventhandlers.go
@@ -8,6 +8,7 @@ import (
"strconv"
"git.sr.ht/~rjarry/aerc/logging"
+ "git.sr.ht/~rjarry/aerc/worker/types"
)
func (w *worker) handleNotmuchEvent(et eventType) error {
@@ -28,22 +29,18 @@ func (w *worker) handleUpdateDirCounts(ev eventType) error {
}
for name := range folders {
query := fmt.Sprintf("folder:%s", strconv.Quote(name))
- info, err := w.buildDirInfo(name, query, true)
- if err != nil {
- logging.Errorf("could not gather DirectoryInfo: %v", err)
- continue
- }
- w.w.PostMessage(info, nil)
+ w.w.PostMessage(&types.DirectoryInfo{
+ Info: w.getDirectoryInfo(name, query),
+ SkipSort: true,
+ }, nil)
}
}
for name, query := range w.nameQueryMap {
- info, err := w.buildDirInfo(name, query, true)
- if err != nil {
- logging.Errorf("could not gather DirectoryInfo: %v", err)
- continue
- }
- w.w.PostMessage(info, nil)
+ w.w.PostMessage(&types.DirectoryInfo{
+ Info: w.getDirectoryInfo(name, query),
+ SkipSort: true,
+ }, nil)
}
return nil
}