aboutsummaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2018-01-10 22:41:15 -0500
committerDrew DeVault <sir@cmpwn.com>2018-01-10 22:41:15 -0500
commit77a0f68758905faa74407499ff92c90929e27989 (patch)
tree44edc8d2de572deff60330f609aecab56aa4dea7 /cmd
parentdb1b2cd53f5dc7bfbfb6ee54ad0bb0882ea2cc03 (diff)
Make termbox event loop async
Diffstat (limited to 'cmd')
-rw-r--r--cmd/aerc/main.go11
1 files changed, 6 insertions, 5 deletions
diff --git a/cmd/aerc/main.go b/cmd/aerc/main.go
index 4adf11e..9da7b3e 100644
--- a/cmd/aerc/main.go
+++ b/cmd/aerc/main.go
@@ -14,6 +14,11 @@ func main() {
if err != nil {
panic(err)
}
+ _ui, err := ui.Initialize(conf)
+ if err != nil {
+ panic(err)
+ }
+ defer _ui.Close()
var workers []worker.Worker
for _, account := range conf.Accounts {
work, err := worker.NewWorker(account.Source)
@@ -23,12 +28,8 @@ func main() {
go work.Run()
work.PostAction(types.Configure{Config: account})
workers = append(workers, work)
+ _ui.AddTab(ui.NewAccountTab(&account, &work))
}
- _ui, err := ui.Initialize(conf)
- if err != nil {
- panic(err)
- }
- defer _ui.Close()
for !_ui.Exit {
activity := false
for _, worker := range workers {