aboutsummaryrefslogtreecommitdiffstats
path: root/widgets
diff options
context:
space:
mode:
authorMoritz Poldrack <git@moritz.sh>2023-02-15 18:38:19 +0100
committerRobin Jarry <robin@jarry.cc>2023-02-16 13:53:35 +0100
commit4ef76f0a95fc1aba7d92fd1a84308286280856e7 (patch)
treeb6b7292d34ea3f9e87ceebe6b4dbe3b90f70020e /widgets
parent05c5dcde23d210514ae84305fb1b0985e62f48fd (diff)
downloadaerc-4ef76f0a95fc1aba7d92fd1a84308286280856e7.tar.gz
aerc: show effects of mailto: and mbox: immediately
When handling a mailto-Link or opening an mbox file, another update is required before the composer is shown. This is caused by the view not being invalidated and no redraw being queued. Invalidate the UI and queue a redraw when an IPC command is received. Fixes: 7a489cb0011a ("Add Unix socket for communicating with aerc") Signed-off-by: Moritz Poldrack <git@moritz.sh> Acked-by: Robin Jarry <robin@jarry.cc>
Diffstat (limited to 'widgets')
-rw-r--r--widgets/aerc.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/widgets/aerc.go b/widgets/aerc.go
index 8eec8823..b946b158 100644
--- a/widgets/aerc.go
+++ b/widgets/aerc.go
@@ -733,6 +733,9 @@ func (aerc *Aerc) Mailto(addr *url.URL) error {
return errors.New("No account selected")
}
+ defer ui.Invalidate()
+ defer ui.QueueRedraw()
+
composer, err := NewComposer(aerc, acct,
acct.AccountConfig(), acct.Worker(), "", h, nil)
if err != nil {
@@ -773,6 +776,9 @@ func (aerc *Aerc) Mbox(source string) error {
acctConf.Postpone = "Drafts"
acctConf.CopyTo = "Sent"
+ defer ui.Invalidate()
+ defer ui.QueueRedraw()
+
mboxView, err := NewAccountView(aerc, &acctConf, aerc, nil)
if err != nil {
aerc.NewTab(errorScreen(err.Error()), acctConf.Name)