summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2019-05-14 14:29:50 -0400
committerDrew DeVault <sir@cmpwn.com>2019-05-14 14:29:50 -0400
commit254e6fe73f227bea480c2c887d08799b39474ef4 (patch)
tree11eb0e430fe236cb65a2f339cdf1d232bfff24f0
parentf77d7c2c3d578ae5a724e1e8b91656304dde75d0 (diff)
downloadaerc-254e6fe73f227bea480c2c887d08799b39474ef4.tar.gz
Remove tab before going async
To prevent repeated attempts to send
-rw-r--r--commands/compose/send.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/commands/compose/send.go b/commands/compose/send.go
index ed3bd43..40ab455 100644
--- a/commands/compose/send.go
+++ b/commands/compose/send.go
@@ -80,6 +80,7 @@ func SendMessage(aerc *widgets.Aerc, args []string) error {
 	}
 
 	aerc.SetStatus("Sending...")
+	aerc.RemoveTab(composer)
 
 	sendAsync := func() {
 		tlsConfig := &tls.Config{
@@ -151,7 +152,6 @@ func SendMessage(aerc *widgets.Aerc, args []string) error {
 		defer wc.Close()
 		composer.WriteMessage(header, wc)
 		composer.Close()
-		aerc.RemoveTab(composer)
 	}
 
 	go func() {
'#n137'>137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167