diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2022-01-15 12:04:00 +1100 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2022-01-15 14:15:41 +1100 |
commit | cdcfeb396fda1e61dee9b6d88ab4659152a10948 (patch) | |
tree | 6b796b8ffc9e30c08e5249e936feacca76f8d8ba /pkg/gui/updates.go | |
parent | f5b9ad8c002eb359959d41f4cd494007ca3e9bf3 (diff) |
stop refreshing the screen so much
Diffstat (limited to 'pkg/gui/updates.go')
-rw-r--r-- | pkg/gui/updates.go | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/pkg/gui/updates.go b/pkg/gui/updates.go index 9b3b6771c..cce723c4f 100644 --- a/pkg/gui/updates.go +++ b/pkg/gui/updates.go @@ -52,10 +52,14 @@ func (gui *Gui) startUpdating(newVersion string) { func (gui *Gui) onUpdateFinish(statusId int, err error) error { gui.State.Updating = false gui.statusManager.removeStatus(statusId) - gui.renderString(gui.Views.AppStatus, "") - if err != nil { - return gui.createErrorPanel("Update failed: " + err.Error()) - } + gui.OnUIThread(func() error { + _ = gui.renderString(gui.Views.AppStatus, "") + if err != nil { + return gui.createErrorPanel("Update failed: " + err.Error()) + } + return nil + }) + return nil } |