aboutsummaryrefslogtreecommitdiff
path: root/models
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 /models
parent063187340ce257a633cc5e6b503112db306be2e6 (diff)
downloadaerc-c13df799763c6b584cf4963e125361bb16c0e07d.tar.gz
aerc-c13df799763c6b584cf4963e125361bb16c0e07d.zip
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 'models')
-rw-r--r--models/templates.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/models/templates.go b/models/templates.go
index ac6d410a..d6b90e88 100644
--- a/models/templates.go
+++ b/models/templates.go
@@ -21,6 +21,7 @@ type TemplateData interface {
Header(name string) string
ThreadPrefix() string
ThreadCount() int
+ ThreadUnread() int
ThreadFolded() bool
ThreadContext() bool
Subject() string