diff options
| -rw-r--r-- | gui/src/main/index.ts | 24 | ||||
| -rw-r--r-- | gui/src/renderer/app.tsx | 5 |
2 files changed, 7 insertions, 22 deletions
diff --git a/gui/src/main/index.ts b/gui/src/main/index.ts index f0cd89a52d..159c8b7dfa 100644 --- a/gui/src/main/index.ts +++ b/gui/src/main/index.ts @@ -1,15 +1,5 @@ import { execFile } from 'child_process'; -import { - app, - BrowserWindow, - ipcMain, - Menu, - nativeImage, - screen, - session, - shell, - Tray, -} from 'electron'; +import { app, BrowserWindow, Menu, nativeImage, screen, session, shell, Tray } from 'electron'; import log from 'electron-log'; import mkdirp from 'mkdirp'; import moment from 'moment'; @@ -530,6 +520,11 @@ class ApplicationMain { if (this.windowController) { IpcMainEventChannel.daemonConnected.notify(this.windowController.webContents); } + + // show window when account is not set + if (!this.settings.accountToken) { + this.windowController?.show(); + } }; private onDaemonDisconnected = (error?: Error) => { @@ -1090,13 +1085,6 @@ class ApplicationMain { } }); - ipcMain.on('show-window', () => { - const windowController = this.windowController; - if (windowController) { - windowController.show(); - } - }); - IpcMainEventChannel.problemReport.handleCollectLogs((toRedact) => { const reportPath = path.join(app.getPath('temp'), uuid.v4() + '.log'); const executable = resolveBin('mullvad-problem-report'); diff --git a/gui/src/renderer/app.tsx b/gui/src/renderer/app.tsx index 091aa6137e..76679427f4 100644 --- a/gui/src/renderer/app.tsx +++ b/gui/src/renderer/app.tsx @@ -1,4 +1,4 @@ -import { ipcRenderer, shell, webFrame } from 'electron'; +import { shell, webFrame } from 'electron'; import log from 'electron-log'; import * as React from 'react'; import { Provider } from 'react-redux'; @@ -546,9 +546,6 @@ export default class AppRenderer { await this.autoConnect(); } else { this.history.resetWith('/login'); - - // show window when account is not set - ipcRenderer.send('show-window'); } } |
