mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-10-11 20:36:39 +00:00
macOS: Make a lot of things more robust
This commit is contained in:
@@ -32,9 +32,22 @@ class UpdateController {
|
||||
/// Start the updater.
|
||||
///
|
||||
/// This must be called before the updater can check for updates. If starting fails,
|
||||
/// an error alert will be shown after a short delay.
|
||||
/// the error will be shown to the user.
|
||||
func startUpdater() {
|
||||
try? updater.start()
|
||||
do {
|
||||
try updater.start()
|
||||
} catch {
|
||||
userDriver.viewModel.state = .error(.init(
|
||||
error: error,
|
||||
retry: { [weak self] in
|
||||
self?.userDriver.viewModel.state = .idle
|
||||
self?.startUpdater()
|
||||
},
|
||||
dismiss: { [weak self] in
|
||||
self?.userDriver.viewModel.state = .idle
|
||||
}
|
||||
))
|
||||
}
|
||||
}
|
||||
|
||||
/// Check for updates.
|
||||
|
Reference in New Issue
Block a user