diff --git a/Sparkle/SUUpdateAlert.m b/Sparkle/SUUpdateAlert.m index 59ddd32e..d0e25f1c 100644 --- a/Sparkle/SUUpdateAlert.m +++ b/Sparkle/SUUpdateAlert.m @@ -262,11 +262,29 @@ static NSString *const SUUpdateAlertTouchBarIndentifier = @"" SPARKLE_BUNDLE_IDE if ([self.updateItem isCriticalUpdate]) { self.skipButton.enabled = NO; + self.skipButton.hidden = YES; + self.laterButton.enabled = NO; + self.laterButton.hidden = YES; } + if (![self automaticChecksEnabled]) { + self.laterButton.enabled = NO; + self.laterButton.hidden = YES; + } + [self.window center]; } +- (BOOL)automaticChecksEnabled { + NSNumber *automaticChecksEnabled = [self.host objectForInfoDictionaryKey:SUEnableAutomaticChecksKey]; + if (automaticChecksEnabled == nil) + { + return false; + } + + return [automaticChecksEnabled boolValue]; +} + - (BOOL)windowShouldClose:(NSNotification *) __unused note { [self endWithSelection:SURemindMeLaterChoice];