Browse Source

1.扫码切换云机延时一秒切换

huangxiaodong 1 year ago
parent
commit
2e11a109a0

+ 6 - 2
创维盒子/双子星云手机/Class/Set/ChangeDevice/QRCodeScanForChangeDeviceViewController.m

@@ -337,8 +337,12 @@ bool isDownType22 = YES;
                 [dict setObject:resStr forKey:Const_Have_Add_Device_SN];
                 [HWDataManager setObjectWithKey:Const_Have_Add_Device value:dict];
                 
-                [self.navigationController popToRootViewControllerAnimated:NO];
-                [[NSNotificationCenter defaultCenter] postNotificationName:GuideOkNotification object:nil];
+                //尝试修复偶现扫码切换云机 已经扫码到 要输新SN密码 但是云机显示是旧SN的 延时一秒跳转
+                dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
+                    [self.navigationController popToRootViewControllerAnimated:NO];
+                    [[NSNotificationCenter defaultCenter] postNotificationName:GuideOkNotification object:nil];
+                });
+                
             }else{
                 
                 if(didSuc == 2){