|
@@ -232,7 +232,7 @@
|
|
|
}
|
|
|
|
|
|
// Start Timer
|
|
|
- self.timerProcessAutoUpload = [NSTimer scheduledTimerWithTimeInterval:2.0 target:self selector:@selector(processAutoUpload) userInfo:nil repeats:YES];
|
|
|
+ self.timerProcessAutoDownloadUpload = [NSTimer scheduledTimerWithTimeInterval:2.0 target:self selector:@selector(processAutoUpload) userInfo:nil repeats:YES];
|
|
|
|
|
|
self.timerUpdateApplicationIconBadgeNumber = [NSTimer scheduledTimerWithTimeInterval:k_timerUpdateApplicationIconBadgeNumber target:self selector:@selector(updateApplicationIconBadgeNumber) userInfo:nil repeats:YES];
|
|
|
|
|
@@ -369,21 +369,21 @@
|
|
|
if ([[UIApplication sharedApplication] applicationState] == UIApplicationStateBackground) {
|
|
|
|
|
|
// ONLY BACKGROUND
|
|
|
- [self performSelectorOnMainThread:@selector(loadAutoUpload:) withObject:[NSNumber numberWithInt:k_maxConcurrentOperationDownloadUploadBackground] waitUntilDone:NO];
|
|
|
+ [self performSelectorOnMainThread:@selector(loadAutoDownloadUpload:) withObject:[NSNumber numberWithInt:k_maxConcurrentOperationDownloadUploadBackground] waitUntilDone:NO];
|
|
|
|
|
|
} else {
|
|
|
|
|
|
// ONLY FOREFROUND
|
|
|
- [self performSelectorOnMainThread:@selector(loadAutoUpload:) withObject:[NSNumber numberWithInt:k_maxConcurrentOperationDownloadUpload] waitUntilDone:NO];
|
|
|
+ [self performSelectorOnMainThread:@selector(loadAutoDownloadUpload:) withObject:[NSNumber numberWithInt:k_maxConcurrentOperationDownloadUpload] waitUntilDone:NO];
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-- (void)loadAutoUpload:(NSNumber *)maxConcurrent
|
|
|
+- (void)loadAutoDownloadUpload:(NSNumber *)maxConcurrent
|
|
|
{
|
|
|
CCMetadataNet *metadataNet;
|
|
|
|
|
|
// Stop Timer
|
|
|
- [_timerProcessAutoUpload invalidate];
|
|
|
+ [_timerProcessAutoDownloadUpload invalidate];
|
|
|
|
|
|
NSInteger maxConcurrentUpload = [maxConcurrent integerValue];
|
|
|
NSInteger counterUploadInSessionAndInLock = [[[NCManageDatabase sharedInstance] getTableMetadataUpload] count] + [[[NCManageDatabase sharedInstance] getTableMetadataUploadWWan] count] + [[[NCManageDatabase sharedInstance] getLockQueueUpload] count];
|
|
@@ -484,7 +484,7 @@
|
|
|
}
|
|
|
|
|
|
// Start Timer
|
|
|
- _timerProcessAutoUpload = [NSTimer scheduledTimerWithTimeInterval:k_timerProcessAutoUpload target:app selector:@selector(processAutoUpload) userInfo:nil repeats:YES];
|
|
|
+ _timerProcessAutoDownloadUpload = [NSTimer scheduledTimerWithTimeInterval:k_timerProcessAutoUpload target:app selector:@selector(processAutoUpload) userInfo:nil repeats:YES];
|
|
|
}
|
|
|
|
|
|
#pragma --------------------------------------------------------------------------------------------
|