mirror of
https://github.com/sparkle-project/Sparkle
synced 2026-11-25 04:47:55 +00:00
Don't see why this method should be very generic
This commit is contained in:
1 parent
15b4d1adf3
commit
6ade2f270b
3 files changed
+4
-4
No files matched your search
Vendored
+1
-1
@@ -112,7 +112,7 @@ SU_EXPORT @interface SUUpdater : NSObject
|
||||
*/
|
||||
- (void)resetUpdateCycle;
|
||||
|
||||
- (void)resetUpdateCycleAfterDelay:(NSTimeInterval)delay;
|
||||
- (void)resetUpdateCycleAfterShortDelay;
|
||||
|
||||
@property (readonly) BOOL updateInProgress;
|
||||
|
||||
|
||||
Vendored
+2
-2
@@ -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
|
||||
|
||||
Vendored
+1
-1
@@ -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];
|
||||
|
||||
Reference in new issue
Block a user