From f42fb51952d4bbafd295ea40a2289e2ae897ff47 Mon Sep 17 00:00:00 2001 From: Andy Matuschak Date: Thu, 24 Jul 2008 20:15:04 -0700 Subject: [PATCH] Made automaticallyChecksForUpdates and updateCheckInterval KVO-compliant. --- SUUpdater.m | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/SUUpdater.m b/SUUpdater.m index 726b4c73..555100c1 100644 --- a/SUUpdater.m +++ b/SUUpdater.m @@ -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