Don't see why this method should be very generic

This commit is contained in:
Zorg committed 2016-02-28 21:01:49 -05:00
1 parent 15b4d1adf3
commit 6ade2f270b
3 files changed
+4 -4

No files matched your search

+1 -1
View File
@@ -112,7 +112,7 @@ SU_EXPORT @interface SUUpdater : NSObject
*/
- (void)resetUpdateCycle;
- (void)resetUpdateCycleAfterDelay:(NSTimeInterval)delay;
- (void)resetUpdateCycleAfterShortDelay;
@property (readonly) BOOL updateInProgress;
+2 -2
View File
@@ -352,10 +352,10 @@ static void SUCheckForUpdatesInBgReachabilityCheck(__weak SUUpdater *updater, SU
[self scheduleNextUpdateCheck];
}
- (void)resetUpdateCycleAfterDelay:(NSTimeInterval)delay
- (void)resetUpdateCycleAfterShortDelay
{
[[self class] cancelPreviousPerformRequestsWithTarget:self selector:@selector(resetUpdateCycle) object:nil];
[self performSelector:@selector(resetUpdateCycle) withObject:nil afterDelay:delay];
[self performSelector:@selector(resetUpdateCycle) withObject:nil afterDelay:1];
}
- (void)setAutomaticallyChecksForUpdates:(BOOL)automaticallyCheckForUpdates
+1 -1
View File
@@ -87,7 +87,7 @@ static NSString *const SUUpdaterDefaultsObservationContext = @"SUUpdaterDefaults
if (context == (__bridge void *)(SUUpdaterDefaultsObservationContext)) {
// Allow a small delay, because perhaps the user or developer wants to change both preferences. This allows the developer to interpret a zero check interval as a sign to disable automatic checking.
// Or we may get this from the developer and from our own KVO observation, this will effectively coalesce them.
[self.updater resetUpdateCycleAfterDelay:1];
[self.updater resetUpdateCycleAfterShortDelay];
} else {
if ([super respondsToSelector:@selector(observeValueForKeyPath:ofObject:change:context:)]) {
[super observeValueForKeyPath:keyPath ofObject:object change:change context:context];