mirror of
https://github.com/sparkle-project/Sparkle
synced 2026-11-25 04:47:55 +00:00
Ensure permission request response is handled on main thread
We were doing this before but I accidentally removed it in a recent commit.
This commit is contained in:
1 parent
833eb89bb5
commit
9052ea912d
1 file changed
+8
-6
Vendored
+8
-6
@@ -310,12 +310,14 @@ NSString *const SUUpdaterAppcastNotificationKey = @"SUUpdaterAppCastNotification
|
||||
|
||||
__weak SPUUpdater *weakSelf = self;
|
||||
[self.userDriver showUpdatePermissionRequest:updatePermissionRequest reply:^(SUUpdatePermissionResponse *response) {
|
||||
SPUUpdater *strongSelf = weakSelf;
|
||||
if (strongSelf != nil) {
|
||||
[strongSelf updatePermissionRequestFinishedWithResponse:response];
|
||||
// Schedule checks, but make sure we ignore the delayed call from KVO
|
||||
[strongSelf resetUpdateCycle];
|
||||
}
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
SPUUpdater *strongSelf = weakSelf;
|
||||
if (strongSelf != nil) {
|
||||
[strongSelf updatePermissionRequestFinishedWithResponse:response];
|
||||
// Schedule checks, but make sure we ignore the delayed call from KVO
|
||||
[strongSelf resetUpdateCycle];
|
||||
}
|
||||
});
|
||||
}];
|
||||
|
||||
// We start the update checks and register as observer for changes after the prompt finishes
|
||||
|
||||
Reference in new issue
Block a user