summaryrefslogtreecommitdiffstats
path: root/pkg/gui/updates.go
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2022-01-15 12:04:00 +1100
committerJesse Duffield <jessedduffield@gmail.com>2022-01-15 14:15:41 +1100
commitcdcfeb396fda1e61dee9b6d88ab4659152a10948 (patch)
tree6b796b8ffc9e30c08e5249e936feacca76f8d8ba /pkg/gui/updates.go
parentf5b9ad8c002eb359959d41f4cd494007ca3e9bf3 (diff)
stop refreshing the screen so much
Diffstat (limited to 'pkg/gui/updates.go')
-rw-r--r--pkg/gui/updates.go12
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
}