Option to start at login

This commit is contained in:
TC
2020-07-12 21:05:34 +02:00
parent eec6993b95
commit 408aa9bb59
3 changed files with 29 additions and 5 deletions

View File

@ -12,6 +12,7 @@ const {
isAppVisible,
isTrayEnabled,
store,
startAtLogin,
} = require("./store");
const { fileExists, injectCSS } = require("./plugins/utils");
const { isTesting } = require("./utils/testing");
@ -170,6 +171,11 @@ app.on("ready", () => {
mainWindow = createMainWindow();
setUpTray(app, mainWindow);
// Autostart at login
app.setLoginItemSettings({
openAtLogin: startAtLogin(),
});
if (!is.dev() && autoUpdate()) {
autoUpdater.checkForUpdatesAndNotify();
autoUpdater.on("update-available", () => {