mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-14 03:41:46 +00:00
Option to restart the app on config changes
This commit is contained in:
9
index.js
9
index.js
@ -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
|
||||
|
||||
Reference in New Issue
Block a user