feat: added an error window when the update failed

This commit is contained in:
Serhiy Mytrovtsiy
2023-03-17 18:31:44 +01:00
parent 7dd4e0ecf3
commit e86c677463
5 changed files with 29 additions and 6 deletions

View File

@@ -103,7 +103,11 @@ class AppDelegate: NSObject, NSApplicationDelegate, UNUserNotificationCenterDele
debug("Downloading new version of app...")
if let url = URL(string: uri) {
updater.download(url, completion: { path in
updater.install(path: path)
updater.install(path: path) { error in
if let error {
showAlert("Error update Stats", error, .critical)
}
}
})
}
}