summaryrefslogtreecommitdiffhomepage
path: root/gui/src
diff options
context:
space:
mode:
authorOskar Nyberg <oskar@mullvad.net>2022-08-23 11:08:13 +0200
committerOskar Nyberg <oskar@mullvad.net>2022-08-23 15:34:19 +0200
commite2792969dcab94e3f7212abe48914c4dfb1379ea (patch)
tree846bdac81faad877e9d873f379c6865c32e5e16e /gui/src
parentcd0dea856ca8f0aabde2affb9104a5a958be46af (diff)
downloadmullvadvpn-e2792969dcab94e3f7212abe48914c4dfb1379ea.tar.xz
mullvadvpn-e2792969dcab94e3f7212abe48914c4dfb1379ea.zip
Remove use of --quit-without-disconnect and limitations due to disconnecting
Diffstat (limited to 'gui/src')
-rw-r--r--gui/src/main/index.ts19
1 files changed, 4 insertions, 15 deletions
diff --git a/gui/src/main/index.ts b/gui/src/main/index.ts
index 4f699bd115..cba52d61e1 100644
--- a/gui/src/main/index.ts
+++ b/gui/src/main/index.ts
@@ -55,7 +55,6 @@ const linuxSplitTunneling = process.platform === 'linux' && require('./linux-spl
const windowsSplitTunneling = process.platform === 'win32' && require('./windows-split-tunneling');
enum CommandLineOptions {
- quitWithoutDisconnect = '--quit-without-disconnect',
showChanges = '--show-changes',
disableResetNavigation = '--disable-reset-navigation', // development only
}
@@ -126,12 +125,8 @@ class ApplicationMain
this.overrideAppPaths();
- // This ensures that only a single instance is running at the same time, but also exits if
- // there's no already running instance when the quit without disconnect flag is supplied.
- if (
- !app.requestSingleInstanceLock() ||
- process.argv.includes(CommandLineOptions.quitWithoutDisconnect)
- ) {
+ // This ensures that only a single instance is running at the same time.
+ if (!app.requestSingleInstanceLock()) {
app.quit();
return;
}
@@ -221,14 +216,8 @@ class ApplicationMain
};
private addSecondInstanceEventHandler() {
- app.on('second-instance', (_event, argv, _workingDirectory) => {
- if (argv.includes(CommandLineOptions.quitWithoutDisconnect)) {
- // Quit if another instance is started with the quit without disconnect flag.
- app.quit();
- } else {
- // If no action was provided to the new instance the window is opened.
- this.userInterface?.showWindow();
- }
+ app.on('second-instance', (_event, _argv, _workingDirectory) => {
+ this.userInterface?.showWindow();
});
}