alroyso 4 months ago
parent
commit
f7b8d566b0
1 changed files with 6 additions and 1 deletions
  1. 6 1
      lib/app/controller/GlobalController.dart

+ 6 - 1
lib/app/controller/GlobalController.dart

@@ -55,6 +55,10 @@ class GlobalController extends GetxController {
 
   Future<void> init(BuildContext context) async {
     this.context = context;
+    if(Platform.isMacOS)
+    {
+      await _wlBaseHelpPlugin.killProcess(ClashName.name);
+    }
     watchExit();
     await controllers.config.initConfig();
     await controllers.cc_service.initConfig();
@@ -62,10 +66,11 @@ class GlobalController extends GetxController {
     await SharedPreferencesUtil().delete("last_successful_url");
     await controllers.tray.initTray();
     controllers.window.initWindow();
-    if(Platform.isWindows){
+    if(Platform.isMacOS){
       await controllers.cc_service.isCanOperationService();
     }
 
+
   }
 
   Future<bool> checkAllCoresStopped() async {