Przeglądaj źródła

fix: Do not set autolaunch at init

#423 #424
MystiPanda 1 rok temu
rodzic
commit
bd8f07c90a
1 zmienionych plików z 0 dodań i 22 usunięć
  1. 0 22
      src-tauri/src/core/sysopt.rs

+ 0 - 22
src-tauri/src/core/sysopt.rs

@@ -204,28 +204,6 @@ impl Sysopt {
             .set_app_path(&app_path)
             .build()?;
 
-        // 避免在开发时将自启动关了
-        #[cfg(feature = "verge-dev")]
-        if !enable {
-            return Ok(());
-        }
-
-        #[cfg(target_os = "macos")]
-        {
-            if enable && !auto.is_enabled().unwrap_or(false) {
-                // 避免重复设置登录项
-                let _ = auto.disable();
-                auto.enable()?;
-            } else if !enable {
-                let _ = auto.disable();
-            }
-        }
-
-        #[cfg(not(target_os = "macos"))]
-        if enable {
-            auto.enable()?;
-        }
-
         *self.auto_launch.lock() = Some(auto);
 
         Ok(())