Dont show update window

This commit is contained in:
Marcus Osobase authored and Marcus Ososbase committed 2017-06-22 17:25:50 -04:00
1 parent 3f2d37486f
commit cd57836ca5
1 file changed
+18 -18
+18 -18
View File
@@ -70,24 +70,24 @@
[[updater delegate] updater:self.updater didFindValidUpdate:self.updateItem];
}
self.updateAlert = [[SUUpdateAlert alloc] initWithAppcastItem:self.updateItem host:self.host completionBlock:^(SUUpdateAlertChoice choice) {
[self updateAlertFinishedWithChoice:choice];
}];
id<SUVersionDisplay> versDisp = nil;
if ([[updater delegate] respondsToSelector:@selector(versionDisplayerForUpdater:)]) {
versDisp = [[updater delegate] versionDisplayerForUpdater:self.updater];
}
[self.updateAlert setVersionDisplayer:versDisp];
// If the app is a menubar app or the like, we need to focus it first and alter the
// update prompt to behave like a normal window. Otherwise if the window were hidden
// there may be no way for the application to be activated to make it visible again.
if ([self.host isBackgroundApplication]) {
[[self.updateAlert window] setHidesOnDeactivate:NO];
[NSApp activateIgnoringOtherApps:YES];
}
// self.updateAlert = [[SUUpdateAlert alloc] initWithAppcastItem:self.updateItem host:self.host completionBlock:^(SUUpdateAlertChoice choice) {
// [self updateAlertFinishedWithChoice:choice];
// }];
//
// id<SUVersionDisplay> versDisp = nil;
// if ([[updater delegate] respondsToSelector:@selector(versionDisplayerForUpdater:)]) {
// versDisp = [[updater delegate] versionDisplayerForUpdater:self.updater];
// }
// [self.updateAlert setVersionDisplayer:versDisp];
//
// // If the app is a menubar app or the like, we need to focus it first and alter the
// // update prompt to behave like a normal window. Otherwise if the window were hidden
// // there may be no way for the application to be activated to make it visible again.
// if ([self.host isBackgroundApplication]) {
// [[self.updateAlert window] setHidesOnDeactivate:NO];
// [NSApp activateIgnoringOtherApps:YES];
// }
// Only show the update alert if the app is active; otherwise, we'll wait until it is.
// if ([NSApp isActive])
// [[self.updateAlert window] makeKeyAndOrderFront:self];