From bf96a6e066696cf57a140cc9c43b72b46ecfc591 Mon Sep 17 00:00:00 2001 From: Zorg Date: Sat, 30 Jan 2021 08:51:00 -0800 Subject: [PATCH] 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. --- Sparkle/SUUpdateAlert.m | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/Sparkle/SUUpdateAlert.m b/Sparkle/SUUpdateAlert.m index e42fe7ea..dc62d481 100644 --- a/Sparkle/SUUpdateAlert.m +++ b/Sparkle/SUUpdateAlert.m @@ -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]; }