Remove hiding skip button and retitling later button

Same reason as #1741

If we can handle all cases properly (minimumAutoupdateVersion, user opting out of automatic downloads, and absence of allowsAutomaticUpdates which is removed in 2.x to both handle sandboxing and resuming automatic downloads) we can possibly accept a contribution to disable skipping / remind me later buttons.

But right now this is edge case-y and not compatible to 2.x going forward.
This commit is contained in:
Zorg committed 2021-01-30 08:51:00 -08:00
1 parent 0b682d3349
commit bf96a6e066
1 file changed
-16
-16
View File
@@ -325,12 +325,6 @@ static NSString *const SUUpdateAlertTouchBarIndentifier = @"" SPARKLE_BUNDLE_IDE
self.automaticallyInstallUpdatesButton.enabled = NO;
}
}
// A developer wishing for automatic updates shouldn't want users to skip updates
// Except maybe when there's a minimum auto update version for auto-downloading specified
if (automaticDownloadsEnabledByDeveloper && self.updateItem.minimumAutoupdateVersion.length == 0) {
self.skipButton.hidden = YES;
}
if ([self.updateItem isCriticalUpdate]) {
self.skipButton.hidden = YES;
@@ -341,16 +335,6 @@ static NSString *const SUUpdateAlertTouchBarIndentifier = @"" SPARKLE_BUNDLE_IDE
if (![self.host boolForKey:SUEnableAutomaticChecksKey]) {
self.laterButton.hidden = YES;
}
// If the developer makes use of minimumAutoupdateVersion, just stick to Remind Me Later on the safe side
// (Install Later would be harmfully incorrect if this update cannot be automatically installed)
// And this is really not the place to do comparison/version checks.
// Also make sure to check that the system and developer allows us to automatically update.
// This logic is not very sound and gets worse in 2.x where apps can be sandboxed. We may need to revisit this
// and also decide if we really need this button in the first place.
if ([self.host boolForKey:SUAutomaticallyUpdateKey] && allowsAutomaticUpdates && self.updateItem.minimumAutoupdateVersion.length == 0) {
[self.laterButton setTitle:SULocalizedString(@"Install Later", @"Alternate title for 'Remind Me Later' button when automatic updates are enabled")];
}
[self.window center];
}