aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/compose.go
diff options
context:
space:
mode:
authorRobin Jarry <robin@jarry.cc>2022-12-20 18:37:16 +0100
committerRobin Jarry <robin@jarry.cc>2023-01-04 22:57:31 +0100
commitd758441fe0c4da6bc3486d0643436ad7ac290a56 (patch)
tree8d8fe289a4612c2dd5b8043028cf5a813502b0f6 /widgets/compose.go
parentae675b491d2b55a06588e8ab4ce8205aaae796c8 (diff)
downloadaerc-d758441fe0c4da6bc3486d0643436ad7ac290a56.tar.gz
templates: add more fields and functions
Add functions and fields in preparation for more than only message templates. The idea is to reuse the same symbols for the message list format and other parts of the UI. Update the man page accordingly. Signed-off-by: Robin Jarry <robin@jarry.cc> Acked-by: Tim Culverhouse <tim@timculverhouse.com>
Diffstat (limited to 'widgets/compose.go')
-rw-r--r--widgets/compose.go15
1 files changed, 14 insertions, 1 deletions
diff --git a/widgets/compose.go b/widgets/compose.go
index c59fa8ef..578c761c 100644
--- a/widgets/compose.go
+++ b/widgets/compose.go
@@ -93,7 +93,20 @@ func NewComposer(
completer: nil,
}
- templateData := templates.NewTemplateData(h, orig)
+ uiConfig := acct.UiConfig()
+
+ templateData := templates.NewTemplateData(
+ acct.acct.From,
+ acct.acct.Aliases,
+ acct.Name(),
+ acct.Directories().Selected(),
+ uiConfig.MessageViewTimestampFormat,
+ uiConfig.MessageViewThisDayTimeFormat,
+ uiConfig.MessageViewThisWeekTimeFormat,
+ uiConfig.MessageViewThisYearTimeFormat,
+ uiConfig.IconAttachment,
+ )
+ templateData.SetHeaders(h, orig)
if err := c.AddTemplate(template, templateData); err != nil {
return nil, err
}