diff --git a/app/main.js b/app/main.js index 1b3d6c6..4aaccd6 100644 --- a/app/main.js +++ b/app/main.js @@ -334,7 +334,9 @@ app.on("ready", function () { console.log(response); }); }); - autoUpdater.checkForUpdatesAndNotify(); + if (getValue("autoupdater") === "true") { + autoUpdater.checkForUpdatesAndNotify(); + } if (getValue("discordrpcstatus") === "true") { loginToRPC(); setActivity(`Opening Microsoft 365...`); diff --git a/app/menu.js b/app/menu.js index f9e6f89..a8da883 100644 --- a/app/menu.js +++ b/app/menu.js @@ -102,6 +102,7 @@ getValueOrDefault("useragentstring", useragents.Windows); getValueOrDefault("discordrpcstatus", "false"); getValueOrDefault("blockadsandtrackers", "false"); getValueOrDefault("dynamicicons", "true"); +getValueOrDefault("autoupdater", "true"); const menulayout = [ ...(process.platform === "darwin" @@ -322,7 +323,35 @@ const menulayout = [ }, checked: getValue("discordrpcstatus") === "true", }, - { type: "separator" }, + { + label: "Enable Auto Updates", + type: "checkbox", + click: () => { + if (getValue("autoupdater") === "true") { + setValue("autoupdater", "false"); + dialog.showMessageBoxSync({ + type: "info", + title: "Auto Updates", + message: "Auto updates have been disabled.", + buttons: ["OK"], + }); + return; + } else if ( + getValue("autoupdater") === "false" || + getValue("autoupdater") === undefined + ) { + setValue("autoupdater", "true"); + dialog.showMessageBoxSync({ + type: "info", + title: "Auto Updates", + message: "Auto updates have been enabled.", + buttons: ["OK"], + }); + return; + } + }, + checked: getValue("autoupdater") === "true", + }, { label: "Enable Dynamic Icons", type: "checkbox",