stop refreshing the screen so much

This commit is contained in:
Jesse Duffield
2022-01-15 12:04:00 +11:00
parent f5b9ad8c00
commit cdcfeb396f
20 changed files with 113 additions and 172 deletions

View File

@@ -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
}