From 941e2e9e7de058f9e6e10efab1ece8be4188468e Mon Sep 17 00:00:00 2001 From: Julio B Date: Wed, 6 Mar 2024 01:11:05 +0200 Subject: ui: use a custom prefix for dummy root These messages are not really the root of the thread, and should not be displayed as such. Add a new special prefix to make them appear like the first child of a rootless thread. Signed-off-by: Julio B Tested-by: Inwit Acked-by: Robin Jarry --- worker/notmuch/lib/database.go | 1 + 1 file changed, 1 insertion(+) (limited to 'worker/notmuch/lib/database.go') diff --git a/worker/notmuch/lib/database.go b/worker/notmuch/lib/database.go index bd0bc639..7216274a 100644 --- a/worker/notmuch/lib/database.go +++ b/worker/notmuch/lib/database.go @@ -138,6 +138,7 @@ func (db *DB) ThreadsFromQuery(ctx context.Context, q string, entireThread bool) tlm := thread.TopLevelMessages() root := db.makeThread(nil, &tlm, entireThread) if len(root) > 1 { + root[0].Dummy = true root[0].FirstChild = root[0].NextSibling root[0].NextSibling.PrevSibling = nil root[0].NextSibling = nil -- cgit