Don't show Autoupdate dock icon if we shouldn't show UI

This commit is contained in:
Zorg committed 2015-09-24 20:43:20 -04:00
1 parent 9a32f6f21d
commit 39f17764e3
1 file changed
+7 -5
+7 -5
View File
@@ -130,11 +130,13 @@ static const NSTimeInterval SUInstallationTimeLimit = 5;
[self.terminationListener startListeningWithCompletion:^{
self.terminationListener = nil;
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(SUInstallationTimeLimit * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
// Show app icon in the dock
ProcessSerialNumber psn = { 0, kCurrentProcess };
TransformProcessType(&psn, kProcessTransformToForegroundApplication);
});
if (self.shouldShowUI) {
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(SUInstallationTimeLimit * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
// Show app icon in the dock
ProcessSerialNumber psn = { 0, kCurrentProcess };
TransformProcessType(&psn, kProcessTransformToForegroundApplication);
});
}
[self install];
}];