aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/aerc.go
diff options
context:
space:
mode:
authorTim Culverhouse <tim@timculverhouse.com>2023-02-03 13:23:08 -0600
committerRobin Jarry <robin@jarry.cc>2023-02-12 00:39:21 +0100
commit2a0da301c51a8862c4e8a73b141adc0f416833a5 (patch)
treedabf9adbef3a4732daae91acb11be941ff3c47f9 /widgets/aerc.go
parent2df3a079a060bb56aaa4d94df066936cb7b73f9d (diff)
downloadaerc-2a0da301c51a8862c4e8a73b141adc0f416833a5.tar.gz
tabs: use template for compose tabs
Use a template for compose tabs. Other available values: Account string Subject string To []*mail.Address From []*mail.Address Cc []*mail.Address Bcc []*mail.Address OriginalFrom []*mail.Address When you use To, From, CC, BCC, or OriginalFrom the title will only be updated when an editing field has lost focus. This is so we don't end up calling "PrepareHeader" on every keystroke, which will likely error out anyways since it will be an invalid header. Subject still updates every keystroke. Signed-off-by: Tim Culverhouse <tim@timculverhouse.com> Acked-by: Robin Jarry <robin@jarry.cc>
Diffstat (limited to 'widgets/aerc.go')
-rw-r--r--widgets/aerc.go10
1 files changed, 1 insertions, 9 deletions
diff --git a/widgets/aerc.go b/widgets/aerc.go
index e8d65539..8eec8823 100644
--- a/widgets/aerc.go
+++ b/widgets/aerc.go
@@ -748,15 +748,7 @@ func (aerc *Aerc) Mailto(addr *url.URL) error {
if to == nil {
composer.FocusEditor("to")
}
- tab := aerc.NewTab(composer, title)
- composer.OnHeaderChange("Subject", func(subject string) {
- if subject == "" {
- tab.Name = "New email"
- } else {
- tab.Name = subject
- }
- ui.Invalidate()
- })
+ composer.Tab = aerc.NewTab(composer, title)
for _, file := range attachments {
composer.AddAttachment(file)