mirror of
https://github.com/agam778/MS-365-Electron.git
synced 2026-02-17 09:02:10 +00:00
Add option to enable/disable auto updater
This commit is contained in:
@@ -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...`);
|
||||
|
||||
31
app/menu.js
31
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",
|
||||
|
||||
Reference in New Issue
Block a user