UI shortcut on desktop restore app from tray if the app is already running
This commit is contained in:
parent
d15b2f7e57
commit
746d8a4873
15
electron.js
15
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)
|
||||
})
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user