Show first instance when starting a second one (#149)
This commit is contained in:
parent
ba8e23e8d4
commit
22160ba59f
1 changed files with 4 additions and 0 deletions
|
@ -84,6 +84,10 @@ const singleInstance = app.requestSingleInstanceLock();
|
||||||
|
|
||||||
if (!singleInstance) {
|
if (!singleInstance) {
|
||||||
app.quit();
|
app.quit();
|
||||||
|
} else {
|
||||||
|
app.on('second-instance', (_event, _argv, _workingDirectory) => {
|
||||||
|
mainWindow?.show();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
const RESOURCES_PATH = app.isPackaged
|
const RESOURCES_PATH = app.isPackaged
|
||||||
|
|
Reference in a new issue