From 7f66297c521fca8f9bc17280f0a96874598bde96 Mon Sep 17 00:00:00 2001 From: Koni Marti Date: Tue, 18 Jul 2023 10:29:52 +0200 Subject: threadbuilder: show siblings even when no parent found MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Show all threading associations even when not all nodes are present. Indicate if a thread is incomplete, i.e. misses a direct parent node. Use the `msglist_thread_orphan.fg=red` styleobject in your stylesheet to indicate whether a messsage has a missing parent. Also use a different thread prefix ("┬─" instead of "├─") not to confuse them with regular threads that have a visible parent. Signed-off-by: Koni Marti Signed-off-by: Robin Jarry Tested-by: Matěj Cepl --- config/style.go | 2 ++ config/templates.go | 1 + 2 files changed, 3 insertions(+) (limited to 'config') diff --git a/config/style.go b/config/style.go index 95e60616..46c46378 100644 --- a/config/style.go +++ b/config/style.go @@ -42,6 +42,7 @@ const ( STYLE_MSGLIST_GUTTER STYLE_MSGLIST_PILL STYLE_MSGLIST_THREAD_CONTEXT + STYLE_MSGLIST_THREAD_ORPHAN STYLE_DIRLIST_DEFAULT STYLE_DIRLIST_UNREAD @@ -92,6 +93,7 @@ var StyleNames = map[string]StyleObject{ "msglist_thread_folded": STYLE_MSGLIST_THREAD_FOLDED, "msglist_thread_context": STYLE_MSGLIST_THREAD_CONTEXT, + "msglist_thread_orphan": STYLE_MSGLIST_THREAD_ORPHAN, "dirlist_default": STYLE_DIRLIST_DEFAULT, "dirlist_unread": STYLE_DIRLIST_UNREAD, diff --git a/config/templates.go b/config/templates.go index 5a38cd61..4000b1fc 100644 --- a/config/templates.go +++ b/config/templates.go @@ -82,6 +82,7 @@ func (d *dummyData) ThreadCount() int { return 0 } func (d *dummyData) ThreadUnread() int { return 0 } func (d *dummyData) ThreadFolded() bool { return false } func (d *dummyData) ThreadContext() bool { return true } +func (d *dummyData) ThreadOrphan() bool { return true } func (d *dummyData) Subject() string { return "Re: [PATCH] hey" } func (d *dummyData) SubjectBase() string { return "[PATCH] hey" } func (d *dummyData) Attach(string) string { return "" } -- cgit