aboutsummaryrefslogtreecommitdiffstats
path: root/models
diff options
context:
space:
mode:
authorRobin Jarry <robin@jarry.cc>2023-02-03 00:01:26 +0100
committerRobin Jarry <robin@jarry.cc>2023-02-20 14:44:37 +0100
commit87e3d4bafa9f1b8e91172c135644783de548e35b (patch)
treef41ed64a68f2e57cccb64b326a0095d1d140cb8b /models
parenta5df5c30b62aae0b2f9d54e6f40fab76999c565b (diff)
downloadaerc-87e3d4bafa9f1b8e91172c135644783de548e35b.tar.gz
templates: add message counts for specific folders
Change the {{.Recent}}, {{.Unread}} and {{.Exists}} template fields to take an arbitrary number of folder names as arguments. If no folder name is specified, these return the counts for all folders. Signed-off-by: Robin Jarry <robin@jarry.cc> Acked-by: Tim Culverhouse <tim@timculverhouse.com>
Diffstat (limited to 'models')
-rw-r--r--models/templates.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/models/templates.go b/models/templates.go
index 84f68c21..bdc93b9c 100644
--- a/models/templates.go
+++ b/models/templates.go
@@ -30,7 +30,7 @@ type TemplateData interface {
OriginalFrom() []*mail.Address
OriginalMIMEType() string
OriginalHeader(name string) string
- Recent() int
- Unread() int
- Exists() int
+ Recent(folders ...string) int
+ Unread(folders ...string) int
+ Exists(folders ...string) int
}