diff --git a/electron.js b/electron.js index a11997ee..c71ec9b6 100644 --- a/electron.js +++ b/electron.js @@ -120,9 +120,16 @@ const isLock = app.requestSingleInstanceLock() if (!isLock) { app.quit() } else { + app.on('second-instance', (event, commandLine, workingDirectory) => { + if (myWindow) { + if (myWindow.isMinimized()) + myWindow.maximize() + myWindow.show() + } + }) app.whenReady().then(() => { - createWindow(); - createTray(); + createWindow() + createTray() if (process.platform === 'win32') { app.setAppUserModelId("org.qortal.QortalUI") } @@ -143,7 +150,7 @@ if (!isLock) { } }) ipcMain.on('app_version', (event) => { - log.info(app.getVersion()); + log.info(app.getVersion()) mainWindow.webContents.send('app_version', { version: app.getVersion() }) }) autoUpdater.on('update-available', (event) => { @@ -195,4 +202,4 @@ if (!isLock) { process.on('uncaughtException', function (err) { log.info("***WHOOPS TIME****"+err) }) -} +} \ No newline at end of file