diff --git a/config/defaults.js b/config/defaults.js index 57c001b1..c2465a15 100644 --- a/config/defaults.js +++ b/config/defaults.js @@ -43,9 +43,9 @@ const defaultConfig = { }, notifications: { enabled: false, - urgency: "normal", unpauseNotification: false, - interactive: false //has effect only on Windows 8+ + urgency: "normal", //has effect only on Linux + interactive: false //has effect only on Windows } }, }; diff --git a/plugins/notifications/back.js b/plugins/notifications/back.js index 38fbbbf8..901bdd1f 100644 --- a/plugins/notifications/back.js +++ b/plugins/notifications/back.js @@ -32,7 +32,7 @@ module.exports = (win, options) => { const registerCallback = getSongInfo(win); let oldNotification; let oldURL = ""; - win.on("ready-to-show", () => { + win.once("ready-to-show", () => { // Register the callback for new song information registerCallback(songInfo => { // on pause - reset url? and skip notification diff --git a/plugins/notifications/interactive.js b/plugins/notifications/interactive.js index d506463a..61f9fed0 100644 --- a/plugins/notifications/interactive.js +++ b/plugins/notifications/interactive.js @@ -13,7 +13,7 @@ module.exports.setupInteractive = (win, unpauseNotification) => { onPause = unpauseNotification; - win.webContents.on("closed", () => { + win.webContents.once("closed", () => { Delete() }); }