diff options
Diffstat (limited to 'lib/state/templates.go')
-rw-r--r-- | lib/state/templates.go | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/lib/state/templates.go b/lib/state/templates.go index e5206cf0..868f9184 100644 --- a/lib/state/templates.go +++ b/lib/state/templates.go @@ -28,7 +28,7 @@ type DataSetter interface { SetHeaders(*mail.Header, *models.OriginalMail) SetInfo(*models.MessageInfo, int, bool) SetVisual(bool) - SetThreading(string, bool, int, int, bool, bool) + SetThreading(ThreadInfo) SetComposer(Composer) SetAccount(*config.AccountConfig) SetFolder(*models.Directory) @@ -44,6 +44,7 @@ type ThreadInfo struct { Unread int Folded bool Context bool + Orphan bool } type templateData struct { @@ -100,15 +101,8 @@ func (d *templateData) SetVisual(visual bool) { d.visual = visual } -func (d *templateData) SetThreading(prefix string, same bool, count int, - unread int, folded bool, context bool, -) { - d.threadInfo.Prefix = prefix - d.threadInfo.SameSubject = same - d.threadInfo.Count = count - d.threadInfo.Unread = unread - d.threadInfo.Folded = folded - d.threadInfo.Context = context +func (d *templateData) SetThreading(info ThreadInfo) { + d.threadInfo = info } func (d *templateData) SetAccount(acct *config.AccountConfig) { @@ -334,6 +328,10 @@ func (d *templateData) ThreadContext() bool { return d.threadInfo.Context } +func (d *templateData) ThreadOrphan() bool { + return d.threadInfo.Orphan +} + func (d *templateData) Subject() string { var subject string switch { |