Skip to content

Commit

Permalink
Follow coding standards for NSTimer selectors.
Browse files Browse the repository at this point in the history
Signed-off-by: Jonathan 'Wolf' Rentzsch <jwr.git@redshed.net>
  • Loading branch information
lapcat authored and rentzsch committed May 3, 2009
1 parent f7ca07b commit 27221d7
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions Sparkle/SUUpdater.m
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ - (void)unregisterAsObserver;
- (void)updateDriverDidFinish:(NSNotification *)note;
- initForBundle:(NSBundle *)bundle;
- (NSURL *)parameterizedFeedURL;
- (void)checkForUpdatesInBackgroundByTimer:(NSTimer*)timer;
@end

@implementation SUUpdater
Expand Down Expand Up @@ -165,13 +166,18 @@ - (void)scheduleNextUpdateCheck
delayUntilCheck = (updateCheckInterval - intervalSinceCheck); // It hasn't been long enough.
else
delayUntilCheck = 0; // We're overdue! Run one now.
checkTimer = [NSTimer scheduledTimerWithTimeInterval:delayUntilCheck target:self selector:@selector(checkForUpdatesInBackground) userInfo:nil repeats:NO];
checkTimer = [NSTimer scheduledTimerWithTimeInterval:delayUntilCheck target:self selector:@selector(checkForUpdatesInBackgroundByTimer:) userInfo:nil repeats:NO];
}

- (void)checkForUpdatesInBackground
- (void)checkForUpdatesInBackgroundByTimer:(NSTimer*)timer
{
checkTimer = nil; // Timer doesn't repeat, so it's invalid, just needs to be set to nil.

[self checkForUpdatesInBackground];
}

- (void)checkForUpdatesInBackground
{
[self checkForUpdatesWithDriver:[[[([self automaticallyDownloadsUpdates] ? [SUAutomaticUpdateDriver class] : [SUScheduledUpdateDriver class]) alloc] initWithUpdater:self] autorelease]];
}

Expand Down

0 comments on commit 27221d7

Please sign in to comment.