Option to restart the app on config changes

This commit is contained in:
TC
2020-12-03 22:29:46 +01:00
parent 6ab01056e0
commit fd97576611
4 changed files with 19 additions and 4 deletions

View File

@ -189,9 +189,12 @@ app.on("activate", () => {
app.on("ready", () => {
mainWindow = createMainWindow();
setApplicationMenu(mainWindow);
config.watch(() => {
setApplicationMenu(mainWindow);
});
if (config.get("options.restartOnConfigChanges")) {
config.watch(() => {
app.relaunch();
app.exit();
});
}
setUpTray(app, mainWindow);
// Autostart at login