From b52291cfc644596473b0632e18c0703f46ae6fba Mon Sep 17 00:00:00 2001 From: Dmytro Tretiakov Date: Mon, 11 Aug 2014 17:48:38 +0300 Subject: [PATCH] Finished updater queue task. --- SUUpdaterQueue.m | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/SUUpdaterQueue.m b/SUUpdaterQueue.m index e9ae2483..896f7858 100644 --- a/SUUpdaterQueue.m +++ b/SUUpdaterQueue.m @@ -106,6 +106,8 @@ @property (assign) BOOL shouldContinueCheck; @property (nonatomic, retain) NSMutableArray *resultUIDrivers; +@property (assign, getter=isProcessingUpdatersCheck) BOOL processingUpdatersCheck; + @end @implementation SUUpdaterQueue @@ -261,6 +263,11 @@ - (void)performCheckForUpdates:(NSString *)selectorName { + if (self.isProcessingUpdatersCheck) + return; + + self.processingUpdatersCheck = YES; + NSUInteger index = 0; self.shouldContinueCheck = YES; self.resultUIDrivers = [NSMutableArray array]; @@ -308,6 +315,8 @@ [driver performSelectorOnMainThread:@selector(didNotFindUpdate) withObject:nil waitUntilDone:YES]; } self.resultUIDrivers = nil; + + self.processingUpdatersCheck = NO; } - (void)checkForUpdates