Browse Source

1.尝试修复设置页面查询数据偶现闪退

huangxiaodong 1 year ago
parent
commit
67be51e094

+ 7 - 6
创维盒子/双子星云手机/Class/Set/MySetViewController.m

@@ -847,13 +847,14 @@
 
 - (void)checkFileTransferTask
 {//有个偶现的闪退在BGFMDB
+    
+    [[uploadFileManager shareInstance] checkHadUploadTaskWithComplete:^(BOOL isSuccess) {
+        self->hadUploadTaskType = isSuccess;
+        [self setRightButtonRedTypeFun];
+    }];
+    
     KWeakSelf
-    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
-        [[uploadFileManager shareInstance] checkHadUploadTaskWithComplete:^(BOOL isSuccess) {
-            self->hadUploadTaskType = isSuccess;
-            [weakSelf setRightButtonRedTypeFun];
-        }];
-        
+    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
         [[downloadManager shareInstance] checkHadDownloadTaskWithComplete:^(BOOL isSuccess) {
             self->hadDownloadTaskType = isSuccess;
             [weakSelf setRightButtonRedTypeFun];

+ 3 - 1
创维盒子/双子星云手机/Vendor/BGFMDB/BG/BGDB.m

@@ -181,7 +181,9 @@ static BGDB* BGdb = nil;
  */
 -(void)addToThreadPool:(void (^_Nonnull)())block{
     
-    if(!self.mulThreadPoolQueue || !self.mulThreadPool || !block){
+    
+    
+    if(!self.mulThreadPoolQueue){
         HLog(@"\n\n\n\n\n\n\n addToThreadPool error");
         NSString *errorstr = [[NSString alloc] initWithFormat:@"addToThreadPool error block:%@,mulThreadPool:%@,mulThreadPoolQueue:%@",block,self.mulThreadPool,self.mulThreadPoolQueue ];
         [cachesFileManager writeLogsWithMsg:errorstr];