|
@@ -164,23 +164,23 @@ class HomeController extends GetxController {
|
|
}
|
|
}
|
|
|
|
|
|
updateStatus(ConnectionStatus.connecting);
|
|
updateStatus(ConnectionStatus.connecting);
|
|
- updateStatus(ConnectionStatus.stopped);
|
|
|
|
- await controllers.global.updateDate();
|
|
|
|
- await controllers.global.updateNode();
|
|
|
|
- //
|
|
|
|
- await controllers.tray.updateTray();
|
|
|
|
|
|
|
|
- if(routeModes == "tun"){
|
|
|
|
- controllers.global.updateMsg("启动tun模式完成...");
|
|
|
|
- }
|
|
|
|
- else{
|
|
|
|
- await controllers.global.systemProxySwitch(true);
|
|
|
|
- controllers.global.updateMsg("设置系统代理完成...");
|
|
|
|
- }
|
|
|
|
- isConnect.value = true;
|
|
|
|
- // Future.delayed(const Duration(seconds: 3), () async {
|
|
|
|
- //
|
|
|
|
- // });
|
|
|
|
|
|
+ Future.delayed(const Duration(seconds: 3), () async {
|
|
|
|
+ updateStatus(ConnectionStatus.stopped);
|
|
|
|
+ await controllers.global.updateDate();
|
|
|
|
+ await controllers.global.updateNode();
|
|
|
|
+ //
|
|
|
|
+ await controllers.tray.updateTray();
|
|
|
|
+
|
|
|
|
+ if(routeModes == "tun"){
|
|
|
|
+ controllers.global.updateMsg("启动tun模式完成...");
|
|
|
|
+ }
|
|
|
|
+ else{
|
|
|
|
+ await controllers.global.systemProxySwitch(true);
|
|
|
|
+ controllers.global.updateMsg("设置系统代理完成...");
|
|
|
|
+ }
|
|
|
|
+ isConnect.value = true;
|
|
|
|
+ });
|
|
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|