From b267de83e38c09d34215e7a33991ae5c111fe649 Mon Sep 17 00:00:00 2001 From: Koni Marti Date: Fri, 14 Jul 2023 20:37:32 +0200 Subject: templates: add ThreadCount and ThreadFolded Add the number of threads and a flag to indicated folded threads to the template data. Use {{.ThreadCount}} and {{.ThreadFolded}} in template expression for the message list. column-subject = {{.ThreadPrefix}}{{if .ThreadFolded}}[{{.ThreadCount}}] {{end}}{{.Subject}} Update default configuration accordingly. Signed-off-by: Koni Marti Signed-off-by: Robin Jarry Tested-by: inwit --- commands/commands_test.go | 2 ++ 1 file changed, 2 insertions(+) (limited to 'commands') diff --git a/commands/commands_test.go b/commands/commands_test.go index 7c3ec84f..c01019d0 100644 --- a/commands/commands_test.go +++ b/commands/commands_test.go @@ -75,6 +75,8 @@ func (d *dummyData) Date() time.Time { return time.Now func (d *dummyData) DateAutoFormat(time.Time) string { return "" } func (d *dummyData) Header(string) string { return "" } func (d *dummyData) ThreadPrefix() string { return "└─>" } +func (d *dummyData) ThreadCount() int { return 0 } +func (d *dummyData) ThreadFolded() bool { return false } func (d *dummyData) Subject() string { return "Re: [PATCH] hey" } func (d *dummyData) SubjectBase() string { return "[PATCH] hey" } func (d *dummyData) Number() int { return 0 } -- cgit