aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/state/templates.go17
1 files changed, 13 insertions, 4 deletions
diff --git a/lib/state/templates.go b/lib/state/templates.go
index d5631b11..2e351a7a 100644
--- a/lib/state/templates.go
+++ b/lib/state/templates.go
@@ -23,8 +23,8 @@ type TemplateData struct {
msgNum int
// message list threading
- ThreadSameSubject bool
- ThreadPrefix string
+ threadSameSubject bool
+ threadPrefix string
// selected account
account *config.AccountConfig
@@ -50,6 +50,11 @@ func (d *TemplateData) SetInfo(info *models.MessageInfo, num int, marked bool) {
d.marked = marked
}
+func (d *TemplateData) SetThreading(prefix string, same bool) {
+ d.threadPrefix = prefix
+ d.threadSameSubject = same
+}
+
func (d *TemplateData) SetAccount(acct *config.AccountConfig) {
d.account = acct
d.myAddresses = make(map[string]bool)
@@ -220,6 +225,10 @@ func (d *TemplateData) Header(name string) string {
return text
}
+func (d *TemplateData) ThreadPrefix() string {
+ return d.threadPrefix
+}
+
func (d *TemplateData) Subject() string {
var subject string
switch {
@@ -228,10 +237,10 @@ func (d *TemplateData) Subject() string {
case d.headers != nil:
subject = d.Header("subject")
}
- if d.ThreadSameSubject {
+ if d.threadSameSubject {
subject = ""
}
- return d.ThreadPrefix + subject
+ return subject
}
func (d *TemplateData) SubjectBase() string {