diff options
| -rw-r--r-- | CHANGELOG.md | 2 | ||||
| -rw-r--r-- | README.md | 2 | ||||
| -rw-r--r-- | gui/src/main/index.ts | 10 |
3 files changed, 13 insertions, 1 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index c6bf8a3923..68bee316f2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,6 +27,8 @@ Line wrap the file at 100 chars. Th ### Added - Added possibility to filter locations by provider in the desktop app. - Add WireGuard over TCP CLI option for all relays. +- Add GUI environment variable `MULLVAD_DISABLE_UPDATE_NOTIFICATION`. If set to `1`, GUI + notification will be disabled when an update is available. #### Android - Added toggle for Split tunneling view to be able to show system apps @@ -509,6 +509,8 @@ to do that before starting the GUI. 1. `MULLVAD_PATH` - Allows changing the path to the folder with the `mullvad-problem-report` tool when running in development mode. Defaults to: `<repo>/target/debug/`. +2. `MULLVAD_DISABLE_UPDATE_NOTIFICATION` - If set to `1`, GUI notification will be disabled when + an update is available. ## Making a release diff --git a/gui/src/main/index.ts b/gui/src/main/index.ts index 94702ce979..8845422e6b 100644 --- a/gui/src/main/index.ts +++ b/gui/src/main/index.ts @@ -88,6 +88,8 @@ const GUI_VERSION = app.getVersion().replace('.0', ''); /// Mirrors the beta check regex in the daemon. Matches only well formed beta versions const IS_BETA = /^(\d{4})\.(\d+)-beta(\d+)$/; +const UPDATE_NOTIFICATION_DISABLED = process.env.MULLVAD_DISABLE_UPDATE_NOTIFICATION === '1'; + const SANDBOX_DISABLED = app.commandLine.hasSwitch('no-sandbox'); enum AppQuitStage { @@ -588,7 +590,9 @@ class ApplicationMain { } // fetch the latest version info in background - void this.fetchLatestVersion(); + if (!UPDATE_NOTIFICATION_DISABLED) { + void this.fetchLatestVersion(); + } // reset the reconnect backoff when connection established. this.reconnectBackoff.reset(); @@ -929,6 +933,10 @@ class ApplicationMain { } private setLatestVersion(latestVersionInfo: IAppVersionInfo) { + if (UPDATE_NOTIFICATION_DISABLED) { + return; + } + const suggestedIsBeta = latestVersionInfo.suggestedUpgrade !== undefined && IS_BETA.test(latestVersionInfo.suggestedUpgrade); |
