summaryrefslogtreecommitdiffhomepage
path: root/gui/src
diff options
context:
space:
mode:
Diffstat (limited to 'gui/src')
-rw-r--r--gui/src/main/index.ts30
1 files changed, 1 insertions, 29 deletions
diff --git a/gui/src/main/index.ts b/gui/src/main/index.ts
index e7822e6cd3..0672effcca 100644
--- a/gui/src/main/index.ts
+++ b/gui/src/main/index.ts
@@ -48,8 +48,6 @@ import ReconnectionBackoff from './reconnection-backoff';
import TrayIconController, { TrayIconType } from './tray-icon-controller';
import WindowController from './window-controller';
-const VERSION_UPDATE_INTERVAL = 24 * 60 * 60 * 1000;
-
const DAEMON_RPC_PATH =
process.platform === 'win32' ? '//./pipe/Mullvad VPN' : '/var/run/mullvad-vpn';
@@ -141,7 +139,6 @@ class ApplicationMain {
latest: '',
nextUpgrade: undefined,
};
- private latestVersionInterval?: NodeJS.Timeout;
// The UI locale which is set once from onReady handler
private locale = 'en';
@@ -446,9 +443,6 @@ class ApplicationMain {
// fetch the latest version info in background
this.fetchLatestVersion();
- // start periodic updates
- this.startLatestVersionPeriodicUpdates();
-
// notify user about inconsistent version
if (
process.env.NODE_ENV !== 'development' &&
@@ -478,9 +472,6 @@ class ApplicationMain {
if (wasConnected) {
this.connectedToDaemon = false;
- // stop periodic updates
- this.stopLatestVersionPeriodicUpdates();
-
// update the tray icon to indicate that the computer is not secure anymore
this.updateTrayIcon({ state: 'disconnected' }, false);
@@ -541,7 +532,7 @@ class ApplicationMain {
} else if ('wireguardKey' in daemonEvent) {
this.handleWireguardKeygenEvent(daemonEvent.wireguardKey);
} else if ('appVersionInfo' in daemonEvent) {
- this.setAppVersionInfo(daemonEvent.appVersionInfo);
+ this.setLatestVersion(daemonEvent.appVersionInfo);
}
},
(error: Error) => {
@@ -588,10 +579,6 @@ class ApplicationMain {
}
}
- private setAppVersionInfo(appVersionInfo: IAppVersionInfo) {
- log.error(`Does not handle new AppVersionInfo yet: ${appVersionInfo}`);
- }
-
private setTunnelState(newState: TunnelState) {
this.tunnelState = newState;
this.updateTrayIcon(newState, this.settings.blockWhenDisconnected);
@@ -801,21 +788,6 @@ class ApplicationMain {
}
}
- private startLatestVersionPeriodicUpdates() {
- const handler = () => {
- this.fetchLatestVersion();
- };
- this.latestVersionInterval = global.setInterval(handler, VERSION_UPDATE_INTERVAL);
- }
-
- private stopLatestVersionPeriodicUpdates() {
- if (this.latestVersionInterval) {
- clearInterval(this.latestVersionInterval);
-
- this.latestVersionInterval = undefined;
- }
- }
-
private shouldSuppressNotifications(isCriticalNotification: boolean): boolean {
const isVisible = this.windowController ? this.windowController.isVisible() : false;