Show first instance when starting a second one (#149)

This commit is contained in:
Gelaechter 2023-07-01 19:45:08 +00:00 committed by GitHub
parent ba8e23e8d4
commit 22160ba59f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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