Marino Faggiana %!s(int64=7) %!d(string=hai) anos
pai
achega
55714b1bf7
Modificáronse 1 ficheiros con 4 adicións e 4 borrados
  1. 4 4
      iOSClient/AppDelegate.m

+ 4 - 4
iOSClient/AppDelegate.m

@@ -816,10 +816,10 @@
     if (self.maintenanceMode)
         return;
     
-    NSInteger total = 0;
-    
-    // Total
-    total = [[CCNetworking sharedNetworking] getNumDownloadInProgressWWan:NO] + [[CCNetworking sharedNetworking] getNumDownloadInProgressWWan:YES] + [[CCNetworking sharedNetworking] getNumUploadInProgressWWan:NO] + [[CCNetworking sharedNetworking] getNumUploadInProgressWWan:YES];
+    NSInteger counterDownload = [[CCNetworking sharedNetworking] getNumDownloadInProgressWWan:NO] + [[CCNetworking sharedNetworking] getNumDownloadInProgressWWan:YES];
+    NSInteger counterUpload = [[[NCManageDatabase sharedInstance] getMetadatasWithPredicate:[NSPredicate predicateWithFormat:@"account = %@ AND (status = %d || status = %d || status = %d)", self.activeAccount, k_metadataStatusWaitUpload, k_metadataStatusInUpload, k_metadataStatusUploading] sorted:@"fileName" ascending:true] count];
+
+    NSInteger total = counterDownload + counterUpload;
     
     [UIApplication sharedApplication].applicationIconBadgeNumber = total;