Merge pull request #1114 from Araxeus/fix-single-instance-lock

This commit is contained in:
Araxeus
2023-04-15 20:39:00 +03:00
committed by GitHub

View File

@ -169,11 +169,11 @@ const mainMenuTemplate = (win) => {
{ {
label: "Single instance lock", label: "Single instance lock",
type: "checkbox", type: "checkbox",
checked: false, checked: true,
click: (item) => { click: (item) => {
if (item.checked && app.hasSingleInstanceLock()) if (!item.checked && app.hasSingleInstanceLock())
app.releaseSingleInstanceLock(); app.releaseSingleInstanceLock();
else if (!item.checked && !app.hasSingleInstanceLock()) else if (item.checked && !app.hasSingleInstanceLock())
app.requestSingleInstanceLock(); app.requestSingleInstanceLock();
}, },
}, },