mirror of
https://github.com/sparkle-project/Sparkle
synced 2026-11-25 04:47:55 +00:00
Ensure install handlers are invoked on main queue (#2235)
This commit is contained in:
2 files changed
+6
-3
No files matched your search
Vendored
+3
-1
@@ -110,7 +110,9 @@
|
||||
if (self.willInstallSilently && [updaterDelegate respondsToSelector:@selector(updater:willInstallUpdateOnQuit:immediateInstallationBlock:)]) {
|
||||
__weak SPUAutomaticUpdateDriver *weakSelf = self;
|
||||
installationHandledByDelegate = [updaterDelegate updater:self.updater willInstallUpdateOnQuit:self.updateItem immediateInstallationBlock:^{
|
||||
[weakSelf.coreDriver finishInstallationWithResponse:SPUUserUpdateChoiceInstall displayingUserInterface:NO];
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
[weakSelf.coreDriver finishInstallationWithResponse:SPUUserUpdateChoiceInstall displayingUserInterface:NO];
|
||||
});
|
||||
}];
|
||||
}
|
||||
|
||||
|
||||
Vendored
+3
-2
@@ -321,8 +321,9 @@
|
||||
__weak __typeof__(self) weakSelf = self;
|
||||
[self.userDriver showInstallingUpdateWithApplicationTerminated:applicationTerminated retryTerminatingApplication:^{
|
||||
if (!applicationTerminated) {
|
||||
__typeof__(self) strongSelf = weakSelf;
|
||||
[strongSelf.coreDriver finishInstallationWithResponse:SPUUserUpdateChoiceInstall displayingUserInterface:YES];
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
[weakSelf.coreDriver finishInstallationWithResponse:SPUUserUpdateChoiceInstall displayingUserInterface:YES];
|
||||
});
|
||||
}
|
||||
}];
|
||||
} else if ([self.userDriver respondsToSelector:@selector(showInstallingUpdateWithApplicationTerminated:)]) {
|
||||
|
||||
Reference in new issue
Block a user