From a9c4c06d325ef13f36d93c165e2a82ee03d1971c Mon Sep 17 00:00:00 2001 From: Daniel Paul Searles Date: Fri, 21 Feb 2014 06:48:42 -0800 Subject: [PATCH] Fixes #20: The check for new releases should run once a day. --- objective-octocat-notifications/AFGithubClient.m | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/objective-octocat-notifications/AFGithubClient.m b/objective-octocat-notifications/AFGithubClient.m index 45bfa24..ac74c39 100644 --- a/objective-octocat-notifications/AFGithubClient.m +++ b/objective-octocat-notifications/AFGithubClient.m @@ -73,6 +73,13 @@ - (void)checkForNewRelease } failure:^(AFHTTPRequestOperation *operation, id json) { NSLog(@"error: %@", json); }]; + + // Check again in a day. + [NSTimer scheduledTimerWithTimeInterval:60 * 60 * 24 + target:self + selector:@selector(checkForNewRelease) + userInfo:nil + repeats:NO]; } - (void)getNotifications