Skip to content

Commit

Permalink
Fix crash checking for updates via the UI
Browse files Browse the repository at this point in the history
Make sure that isCheckingForUpdates KVO notifs are always sent on the main thread

Crash Log: Quicksilver_2022-06-15-162311_Torii.crash
  • Loading branch information
pjrobertson committed Jun 18, 2022
1 parent b75267a commit be64f35
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Quicksilver/Code-App/QSUpdateController.m
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,14 @@ - (void)checkForUpdateStatus:(BOOL)userInitiated completionHandler:(void (^)(QSU
[dataTask resume];
}

+ (BOOL)automaticallyNotifiesObserversForKey:(NSString *)key {
if ([key isEqualToString:@"isCheckingForUpdates"]) {
// we udpate isCheckingForUpdates manually, so we can do it on the main thread
return NO;
}
return YES;
}

- (void)setIsCheckingForUpdates:(BOOL)val {
QSGCDMainAsync(^{
[self willChangeValueForKey:@"isCheckingForUpdates"];
Expand Down

0 comments on commit be64f35

Please sign in to comment.