macOS: Make a lot of things more robust

This commit is contained in:
Mitchell Hashimoto
2025-10-10 07:11:22 -07:00
parent ba8eae027e
commit 6993947a3a
6 changed files with 34 additions and 15 deletions

View File

@@ -86,9 +86,10 @@ class UpdateDriver: NSObject, SPUUserDriver {
acknowledgement: @escaping () -> Void) {
viewModel.state = .error(.init(
error: error,
retry: { [weak viewModel] in
retry: { [weak self, weak viewModel] in
viewModel?.state = .idle
DispatchQueue.main.async {
DispatchQueue.main.async { [weak self] in
guard let self else { return }
guard let delegate = NSApp.delegate as? AppDelegate else { return }
delegate.checkForUpdates(self)
}