소스 검색

fix : dispatch_get_main_queue

Marino Faggiana 7 년 전
부모
커밋
feea4bc3f6
1개의 변경된 파일7개의 추가작업 그리고 4개의 파일을 삭제
  1. 7 4
      iOSClient/Networking/CCNetworking.m

+ 7 - 4
iOSClient/Networking/CCNetworking.m

@@ -1123,13 +1123,16 @@
             NSLog(@"[LOG] Upload file %@ TaskIdentifier %lu", fileName, (unsigned long)uploadTask.taskIdentifier);
         }
 
-        // refresh main
-        if ([self.delegate respondsToSelector:@selector(reloadDatasource:)])
-            [self.delegate reloadDatasource:serverUrl];
+        dispatch_async(dispatch_get_main_queue(), ^{
+            // refresh main
+            if ([self.delegate respondsToSelector:@selector(reloadDatasource:)])
+                [self.delegate reloadDatasource:serverUrl];
         
 #ifndef EXTENSION
-        [app updateApplicationIconBadgeNumber];
+            [app updateApplicationIconBadgeNumber];
 #endif
+        });
+        
      });
 }