diff --git a/Sparkle/SUUpdateAlert.m b/Sparkle/SUUpdateAlert.m index 090ace02..e826ee69 100644 --- a/Sparkle/SUUpdateAlert.m +++ b/Sparkle/SUUpdateAlert.m @@ -326,6 +326,13 @@ static NSString *const SUUpdateAlertTouchBarIndentifier = @"" SPARKLE_BUNDLE_IDE self.laterButton.enabled = NO; self.laterButton.hidden = YES; } + + if([self automaticallyUpdateEnabled]) { + self.skipButton.hidden = YES; + self.automaticallyInstallUpdatesButton.hidden = YES; + [self.laterButton setTitle:SULocalizedString(@"Install later", @"Alternate title for 'Remind me later' button when automatic updates are enabled")]; + } + [self.window center]; } @@ -339,6 +346,16 @@ static NSString *const SUUpdateAlertTouchBarIndentifier = @"" SPARKLE_BUNDLE_IDE return [automaticChecksEnabled boolValue]; } +- (BOOL)automaticallyUpdateEnabled { + NSNumber *automaticChecksEnabled = [self.host objectForKey:SUAutomaticallyUpdateKey]; + if (automaticChecksEnabled == nil) + { + return false; + } + + return [automaticChecksEnabled boolValue]; +} + - (BOOL)windowShouldClose:(NSNotification *) __unused note { [self endWithSelection:SURemindMeLaterChoice];