mirror of
https://github.com/responsively-org/responsively-app
synced 2024-11-10 14:54:12 +00:00
Opening the app on click of the laucher icon when no window is visible
This commit is contained in:
parent
68550864f8
commit
309444e7a5
1 changed files with 10 additions and 1 deletions
|
@ -74,7 +74,7 @@ app.on('login', (event, webContents, request, authInfo, callback) => {
|
|||
mainWindow.webContents.send('http-auth-prompt', {url});
|
||||
});
|
||||
|
||||
app.on('ready', async () => {
|
||||
const createWindow = async () => {
|
||||
if (
|
||||
process.env.NODE_ENV === 'development' ||
|
||||
process.env.DEBUG_PROD === 'true'
|
||||
|
@ -140,4 +140,13 @@ app.on('ready', async () => {
|
|||
// Remove this if your app does not use auto updates
|
||||
// eslint-disable-next-line
|
||||
new AppUpdater();
|
||||
};
|
||||
|
||||
app.on('activate', (event, hasVisibleWindows) => {
|
||||
if (hasVisibleWindows) {
|
||||
return;
|
||||
}
|
||||
createWindow();
|
||||
});
|
||||
|
||||
app.on('ready', createWindow);
|
||||
|
|
Loading…
Reference in a new issue