From ac0aaddefacc5a2f0ae5d2bab6c22834a3a28584 Mon Sep 17 00:00:00 2001 From: Zorg Date: Sun, 27 Mar 2016 15:51:52 -0400 Subject: [PATCH] Use -resetUpdateCycleAfterShortDelay internally but don't expose it publicly --- Sparkle/SUUpdater.h | 10 ---------- Sparkle/SUUpdater.m | 7 ++----- 2 files changed, 2 insertions(+), 15 deletions(-) diff --git a/Sparkle/SUUpdater.h b/Sparkle/SUUpdater.h index c53be169..a937ada1 100644 --- a/Sparkle/SUUpdater.h +++ b/Sparkle/SUUpdater.h @@ -119,16 +119,6 @@ SU_EXPORT @interface SUUpdater : NSObject */ - (void)resetUpdateCycle; -/*! - Resets the update cycle after a short delay - - This may be appropriate for when a user changes preferences for time interval and automatic checks, - but have not made their mind yet and decide to toggle the preferences back immediately. - - See -resetUpdateCycle for more details - */ -- (void)resetUpdateCycleAfterShortDelay; - /*! Returns if an update is in progress or not diff --git a/Sparkle/SUUpdater.m b/Sparkle/SUUpdater.m index 5d32eef2..6e899083 100644 --- a/Sparkle/SUUpdater.m +++ b/Sparkle/SUUpdater.m @@ -420,9 +420,8 @@ static void SUCheckForUpdatesInBgReachabilityCheck(__weak SUUpdater *updater, id if (automaticallyCheckForUpdates && (NSInteger)[self updateCheckInterval] == 0) { [self setUpdateCheckInterval:SUDefaultUpdateCheckInterval]; } - [self cancelNextUpdateCycle]; // Provide a small delay in case multiple preferences are being updated simultaneously. - [self performSelector:@selector(resetUpdateCycle) withObject:nil afterDelay:1]; + [self resetUpdateCycleAfterShortDelay]; } - (BOOL)automaticallyChecksForUpdates @@ -550,10 +549,8 @@ static void SUCheckForUpdatesInBgReachabilityCheck(__weak SUUpdater *updater, id if ((NSInteger)updateCheckInterval == 0) { // For compatibility with 1.1's settings. [self setAutomaticallyChecksForUpdates:NO]; } - [self cancelNextUpdateCycle]; - // Provide a small delay in case multiple preferences are being updated simultaneously. - [self performSelector:@selector(resetUpdateCycle) withObject:nil afterDelay:1]; + [self resetUpdateCycleAfterShortDelay]; } - (NSTimeInterval)updateCheckInterval