alroyso 3 月之前
父节点
当前提交
39e4acdc60
共有 1 个文件被更改,包括 5 次插入0 次删除
  1. 5 0
      lib/app/controller/service.dart

+ 5 - 0
lib/app/controller/service.dart

@@ -257,6 +257,11 @@ class ServiceController extends GetxController {
         controllers.core.setApi(controllers.config.clashCoreApiAddress.value, controllers.config.clashCoreApiSecret.value);
         await controllers.core.changeConfig(path.join(Paths.config.path, controllers.config.config.value.selected));
         controllers.global.updateMsg("fetchReloadConfig${controllers.config.clashCoreApiAddress.value}...");
+      } else {
+        controllers.global.updateMsg("重新配置...");
+        await controllers.config.readClashCoreApi();
+        controllers.core.setApi(controllers.config.clashCoreApiAddress.value, controllers.config.clashCoreApiSecret.value);
+        await controllers.core.changeConfig(path.join(Paths.config.path, controllers.config.config.value.selected));
       }
     } catch (e) {
       controllers.global.updateMsg("重新配置...");