mirror of
https://github.com/sparkle-project/Sparkle
synced 2026-11-28 05:14:34 +00:00
Dispatch reply blocks to main queue
This commit is contained in:
1 parent
fbfcbbdf2d
commit
dec088b9ad
2 files changed
+8
-4
No files matched your search
Vendored
+3
-1
@@ -42,7 +42,9 @@ static const NSTimeInterval SUAutomaticUpdatePromptImpatienceTimer = 60 * 60 * 2
|
||||
self.interruptible = NO;
|
||||
|
||||
[self.updater.userUpdaterDriver showAutomaticUpdateFoundWithAppcastItem:self.updateItem reply:^(SUAutomaticInstallationChoice choice) {
|
||||
[self automaticUpdateAlertFinishedWithChoice:choice];
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
[self automaticUpdateAlertFinishedWithChoice:choice];
|
||||
});
|
||||
}];
|
||||
}
|
||||
|
||||
|
||||
Vendored
+5
-3
@@ -234,11 +234,13 @@ static NSString *const SUUpdaterDefaultsObservationContext = @"SUUpdaterDefaults
|
||||
NSTimeInterval delayUntilCheck = (updateCheckInterval - intervalSinceCheck); // It hasn't been long enough.
|
||||
[self.userUpdaterDriver startUpdateCheckTimerWithNextTimeInterval:delayUntilCheck reply:^(SUUpdateCheckTimerStatus checkTimerStatus) {
|
||||
switch (checkTimerStatus) {
|
||||
case SUCheckForUpdateNow:
|
||||
[self checkForUpdatesInBackground];
|
||||
break;
|
||||
case SUCheckForUpdateWillOccurLater:
|
||||
break;
|
||||
case SUCheckForUpdateNow:
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
[self checkForUpdatesInBackground];
|
||||
});
|
||||
break;
|
||||
}
|
||||
}];
|
||||
} else {
|
||||
|
||||
Reference in new issue
Block a user