Made automaticallyChecksForUpdates and updateCheckInterval KVO-compliant.

This commit is contained in:
Andy Matuschak committed 2008-07-24 20:15:04 -07:00
1 parent 1aea1b699a
commit f42fb51952
1 file changed
+4
+4
View File
@@ -210,6 +210,10 @@ static NSString *SUUpdaterDefaultsObservationContext = @"SUUpdaterDefaultsObserv
// Or we may get this from the developer and from our own KVO observation, this will effectively coalesce them.
[[self class] cancelPreviousPerformRequestsWithTarget:self selector:@selector(resetUpdateCycle) object:nil];
[self performSelector:@selector(resetUpdateCycle) withObject:nil afterDelay:15];
if ([keyPath rangeOfString:SUEnableAutomaticChecksKey].location != NSNotFound)
[self didChangeValueForKey:@"automaticallyChecksForUpdates"];
else if ([keyPath rangeOfString:SUScheduledCheckIntervalKey].location != NSNotFound)
[self didChangeValueForKey:@"updateCheckInterval"];
[self resetUpdateCycle];
}
else