Use -resetUpdateCycleAfterShortDelay internally but don't expose it publicly

This commit is contained in:
Zorg committed 2016-03-27 15:51:52 -04:00
1 parent 528c6f25ed
commit ac0aaddefa
2 files changed
+2 -15

No files matched your search

-10
View File
@@ -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
+2 -5
View File
@@ -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