gaoshuaixing 4 년 전
부모
커밋
71f7057ace
1개의 변경된 파일0개의 추가작업 그리고 28개의 파일을 삭제
  1. 0 28
      electron/lib/AutoLaunch.js

+ 0 - 28
electron/lib/AutoLaunch.js

@@ -1,28 +0,0 @@
-const { app } = require('electron');
-const { LOGIN_SETTING_OPTIONS } = require('./constant').AutoLaunch;
-
-class AutoLaunch {
-  enable () {
-    const enabled = app.getLoginItemSettings(LOGIN_SETTING_OPTIONS).openAtLogin;
-    if (enabled) {
-      return true;
-    }
-    app.setLoginItemSettings({
-      ...LOGIN_SETTING_OPTIONS,
-      openAtLogin: true
-    })
-    return true;
-  }
-  
-  disable () {
-    app.setLoginItemSettings({ openAtLogin: false })
-    return true;
-  }
-
-  isEnabled () {
-    const enabled = app.getLoginItemSettings(LOGIN_SETTING_OPTIONS).openAtLogin;
-    return enabled;
-  }
-}
-
-module.exports = AutoLaunch;