aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/compose.go
diff options
context:
space:
mode:
authorTim Culverhouse <tim@timculverhouse.com>2023-04-16 09:53:46 -0500
committerRobin Jarry <robin@jarry.cc>2023-04-22 22:40:12 +0200
commitd8c2d63ee9b37e78d0e06ec71b2227b83ee52aa5 (patch)
treeea71295539f16c1f696dcb2edbca1475d93298a8 /widgets/compose.go
parent669431702f46eb58f893cbe722040de3792f6b03 (diff)
downloadaerc-d8c2d63ee9b37e78d0e06ec71b2227b83ee52aa5.tar.gz
directory: add role to template fields
Add .Role as a template field for use in distinguishing between mailboxes with a given IANA role, or custom role defined by aerc ("query" for notmuch queries, for example). Signed-off-by: Tim Culverhouse <tim@timculverhouse.com> Acked-by: Robin Jarry<robin@jarry.cc>
Diffstat (limited to 'widgets/compose.go')
-rw-r--r--widgets/compose.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/widgets/compose.go b/widgets/compose.go
index 3693ad18..3a960325 100644
--- a/widgets/compose.go
+++ b/widgets/compose.go
@@ -98,7 +98,7 @@ func NewComposer(
var data state.TemplateData
data.SetAccount(acct.acct)
- data.SetFolder(acct.Directories().Selected())
+ data.SetFolder(acct.Directories().SelectedDirectory())
data.SetHeaders(h, orig)
if err := c.AddTemplate(template, &data); err != nil {
return nil, err
@@ -1589,7 +1589,7 @@ func (c *Composer) setTitle() {
header.SetSubject("New Email")
}
data.SetAccount(c.acctConfig)
- data.SetFolder(c.acct.SelectedDirectory())
+ data.SetFolder(c.acct.Directories().SelectedDirectory())
data.SetHeaders(&header, c.parent)
var buf bytes.Buffer