diff options
author | Tim Culverhouse <tim@timculverhouse.com> | 2023-09-25 09:07:43 -0500 |
---|---|---|
committer | Robin Jarry <robin@jarry.cc> | 2023-09-27 23:12:41 +0200 |
commit | 4ec1e1a5e4c74236a6d1992c8778c39fd25d847b (patch) | |
tree | b6ade84273558cf6c03ae8e7b606c3d2edd998ab /worker/notmuch/worker.go | |
parent | 439204d994e8ba9ab3045139bc716bee812f4029 (diff) | |
download | aerc-4ec1e1a5e4c74236a6d1992c8778c39fd25d847b.tar.gz |
ui: enable showing of thread-context
Add a UI config value to enable showing of "thread-context", similar
to `notmuch show --entire-thread=true`. Add an associated style called
"msglist_thread_context" which can be used to style such messages.
Currently this feature is only supported by notmuch. It would be
possible for maildir to implement as well, IMAP with gmail custom
extensions, and JMAP. This patch merely implements the notmuch version
and puts the groundwork in for handling these sorts of displays.
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/notmuch/worker.go')
-rw-r--r-- | worker/notmuch/worker.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/worker/notmuch/worker.go b/worker/notmuch/worker.go index d1eb69d0..2f601528 100644 --- a/worker/notmuch/worker.go +++ b/worker/notmuch/worker.go @@ -635,6 +635,7 @@ func (w *worker) emitDirectoryContents(parent types.WorkerMessage) error { func (w *worker) emitDirectoryThreaded(parent types.WorkerMessage) error { query := w.query ctx := context.Background() + threadContext := false if msg, ok := parent.(*types.FetchDirectoryThreaded); ok { log.Debugf("filter input: '%v'", msg.FilterCriteria) s, err := translate(msg.FilterCriteria) @@ -646,8 +647,9 @@ func (w *worker) emitDirectoryThreaded(parent types.WorkerMessage) error { log.Debugf("filter query: '%s'", query) } ctx = msg.Context + threadContext = msg.ThreadContext } - threads, err := w.db.ThreadsFromQuery(ctx, query) + threads, err := w.db.ThreadsFromQuery(ctx, query, threadContext) if err != nil { return err } |