aboutsummaryrefslogtreecommitdiffstats
path: root/aerc.go
diff options
context:
space:
mode:
authorRobin Jarry <robin@jarry.cc>2022-09-14 21:09:02 +0200
committerRobin Jarry <robin@jarry.cc>2022-09-14 22:11:33 +0200
commitee7937d0dd9201fdb78f363ddc8af950d0778f1b (patch)
tree33d827476be133aad84086b3d56b8b5ee0dbefd8 /aerc.go
parentd93ad24f5f8f1f9204b5951abcb4691c9fd0b80f (diff)
downloadaerc-ee7937d0dd9201fdb78f363ddc8af950d0778f1b.tar.gz
ui: cleanup internals and api
Now that tcell events are handled in a goroutine, no need for a channel to buffer them. Rename ui.Tick() to ui.Render() and ui.Run() to ui.ProcessEvents() to better reflect what these functions do. Move screen.PollEvent() into ui.ProcessEvents(). Register the panic handler in ui.ProcessEvents(). Remove aerc.ui.Tick() from DecryptKeys(). What the hell was that? Signed-off-by: Robin Jarry <robin@jarry.cc> Tested-by: Tim Culverhouse <tim@timculverhouse.com>
Diffstat (limited to 'aerc.go')
-rw-r--r--aerc.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/aerc.go b/aerc.go
index 37d9509f..e1a1345b 100644
--- a/aerc.go
+++ b/aerc.go
@@ -241,12 +241,12 @@ func main() {
setWindowTitle()
}
- go ui.Run()
+ go ui.ProcessEvents()
for !ui.ShouldExit() {
for aerc.Tick() {
// Continue updating our internal state
}
- if !ui.Tick() {
+ if !ui.Render() {
// ~60 FPS
time.Sleep(16 * time.Millisecond)
}