diff options
author | Koni Marti <koni.marti@gmail.com> | 2023-07-14 20:37:32 +0200 |
---|---|---|
committer | Robin Jarry <robin@jarry.cc> | 2023-07-16 10:13:12 +0200 |
commit | b267de83e38c09d34215e7a33991ae5c111fe649 (patch) | |
tree | adeb2619459228d43475d4efd92324ba82ad4e38 /commands/commands_test.go | |
parent | 94b1c778dbe691a75b0d918e9c40cc34f8523768 (diff) | |
download | aerc-b267de83e38c09d34215e7a33991ae5c111fe649.tar.gz |
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 <koni.marti@gmail.com>
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: inwit <inwit@sindominio.net>
Diffstat (limited to 'commands/commands_test.go')
-rw-r--r-- | commands/commands_test.go | 2 |
1 files changed, 2 insertions, 0 deletions
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 } |