aboutsummaryrefslogtreecommitdiffstats
path: root/config/templates.go
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 /config/templates.go
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 'config/templates.go')
-rw-r--r--config/templates.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/config/templates.go b/config/templates.go
index f9dda0ea..3fce9857 100644
--- a/config/templates.go
+++ b/config/templates.go
@@ -101,6 +101,6 @@ func (d *dummyData) OriginalDate() time.Time { return time.Now() }
func (d *dummyData) OriginalFrom() []*mail.Address { return d.From() }
func (d *dummyData) OriginalMIMEType() string { return "text/plain" }
func (d *dummyData) OriginalHeader(string) string { return "" }
-func (d *dummyData) Recent() int { return 1 }
-func (d *dummyData) Unread() int { return 3 }
-func (d *dummyData) Exists() int { return 14 }
+func (d *dummyData) Recent(...string) int { return 1 }
+func (d *dummyData) Unread(...string) int { return 3 }
+func (d *dummyData) Exists(...string) int { return 14 }