|
@@ -304,14 +304,15 @@
|
|
|
|
|
|
[self.hud visibleHudTitle:NSLocalizedString(@"_remove_cache_", nil) mode:MBProgressHUDModeIndeterminate color:nil];
|
|
|
|
|
|
- dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 0.01 * NSEC_PER_SEC), dispatch_get_main_queue(), ^(void) {
|
|
|
+ dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 5 * NSEC_PER_SEC),dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
|
|
|
|
|
|
[app cancelAllOperations];
|
|
|
+
|
|
|
[[CCNetworking sharedNetworking] settingSessionsDownload:YES upload:YES taskStatus:k_taskStatusCancel activeAccount:app.activeAccount activeUser:app.activeUser activeUrl:app.activeUrl];
|
|
|
|
|
|
[[NSURLCache sharedURLCache] setMemoryCapacity:0];
|
|
|
[[NSURLCache sharedURLCache] setDiskCapacity:0];
|
|
|
-
|
|
|
+
|
|
|
[[NCManageDatabase sharedInstance] clearTable:[tableActivity class] account:app.activeAccount];
|
|
|
[[NCManageDatabase sharedInstance] clearTable:[tableAutomaticUpload class] account:app.activeAccount];
|
|
|
[[NCManageDatabase sharedInstance] clearTable:[tableCapabilities class] account:app.activeAccount];
|
|
@@ -332,12 +333,12 @@
|
|
|
|
|
|
[self recalculateSize];
|
|
|
|
|
|
- // Inizialized home
|
|
|
- [[NSNotificationCenter defaultCenter] postNotificationOnMainThreadName:@"initializeMain" object:nil];
|
|
|
-
|
|
|
- [self.hud hideHud];
|
|
|
+ dispatch_async(dispatch_get_main_queue(), ^{
|
|
|
+ // Inizialized home
|
|
|
+ [[NSNotificationCenter defaultCenter] postNotificationOnMainThreadName:@"initializeMain" object:nil];
|
|
|
+ [self.hud hideHud];
|
|
|
+ });
|
|
|
});
|
|
|
-
|
|
|
}]];
|
|
|
|
|
|
[alertController addAction: [UIAlertAction actionWithTitle:NSLocalizedString(@"_cancel_", nil) style:UIAlertActionStyleCancel handler:^(UIAlertAction *action) {
|