aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorinwit <inwit@sindominio.net>2023-11-09 21:35:04 +0100
committerRobin Jarry <robin@jarry.cc>2023-11-12 12:53:11 +0100
commitc13df799763c6b584cf4963e125361bb16c0e07d (patch)
tree31262c5de8a47ff7b4d1ca9be75924d80c95173d /config
parent063187340ce257a633cc5e6b503112db306be2e6 (diff)
downloadaerc-c13df799763c6b584cf4963e125361bb16c0e07d.tar.gz
threads: add .ThreadUnread to template data
When a thread is folded, it can be useful to know how many unseen messages lie below the root. For example, one might want to show that count in the message list: column-folded = {{if .ThreadFolded \ }}{{if ne .ThreadUnread 0 \ }}{{.ThreadUnread | printf "%s/"}}{{ \ end}}{{ .ThreadCount | printf "%s"}}{{end}} Add `.ThreadUnread` to the template functions. Changelog-added: `.ThreadUnread` is now available in templates. Signed-off-by: inwit <inwit@sindominio.net> Acked-by: Robin Jarry <robin@jarry.cc>
Diffstat (limited to 'config')
-rw-r--r--config/templates.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/config/templates.go b/config/templates.go
index e2adeac2..cab8efb2 100644
--- a/config/templates.go
+++ b/config/templates.go
@@ -77,6 +77,7 @@ 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) ThreadUnread() int { return 0 }
func (d *dummyData) ThreadFolded() bool { return false }
func (d *dummyData) ThreadContext() bool { return true }
func (d *dummyData) Subject() string { return "Re: [PATCH] hey" }