aboutsummaryrefslogtreecommitdiffstats
path: root/worker
diff options
context:
space:
mode:
authorTim Culverhouse <tim@timculverhouse.com>2023-08-30 16:17:56 -0500
committerRobin Jarry <robin@jarry.cc>2023-08-31 17:36:14 +0200
commit67807a6b9b05e55f772fa985aa2dd34bc2915599 (patch)
tree6071032564fccf315b11eedae28b376876fd69bb /worker
parent31488503aa0edf0962a9d90f5a093d346ea29f06 (diff)
downloadaerc-67807a6b9b05e55f772fa985aa2dd34bc2915599.tar.gz
notmuch: fix modify labels dropping threading
When using the notmuch backend, any modifications of labels changes the UI to an unthreaded state. Don't send a fresh DirectoryContents, and instead instruct the UI to fetch a new message list based on current threading/sorting/filtering criteria. Signed-off-by: Tim Culverhouse <tim@timculverhouse.com> Tested-by: Inwit <inwit@sindominio.net> Acked-by: Robin Jarry <robin@jarry.cc>
Diffstat (limited to 'worker')
-rw-r--r--worker/notmuch/worker.go11
1 files changed, 4 insertions, 7 deletions
diff --git a/worker/notmuch/worker.go b/worker/notmuch/worker.go
index 13733d60..9ba76d90 100644
--- a/worker/notmuch/worker.go
+++ b/worker/notmuch/worker.go
@@ -586,15 +586,12 @@ func (w *worker) handleModifyLabels(msg *types.ModifyLabels) error {
}
}
// tags changed, most probably some messages shifted to other folders
- // so we need to re-enumerate the query content
- err := w.emitDirectoryContents(msg)
- if err != nil {
- return err
- }
- // and update the list of possible tags
+ // so we need to re-enumerate the query content and update the list of
+ // possible tags
w.emitLabelList()
w.w.PostMessage(&types.DirectoryInfo{
- Info: w.getDirectoryInfo(w.currentQueryName, w.query),
+ Info: w.getDirectoryInfo(w.currentQueryName, w.query),
+ Refetch: true,
}, nil)
w.done(msg)
return nil