once instead of on

This commit is contained in:
Araxeus
2021-04-23 04:01:40 +03:00
parent f765fb63f0
commit 7c6ed7bb31
3 changed files with 4 additions and 4 deletions

View File

@ -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
}
},
};

View File

@ -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

View File

@ -13,7 +13,7 @@ module.exports.setupInteractive = (win, unpauseNotification) => {
onPause = unpauseNotification;
win.webContents.on("closed", () => {
win.webContents.once("closed", () => {
Delete()
});
}