summaryrefslogtreecommitdiffhomepage
path: root/gui/src/main
diff options
context:
space:
mode:
authorOskar Nyberg <oskar@mullvad.net>2022-04-14 13:23:02 +0200
committerOskar Nyberg <oskar@mullvad.net>2022-04-20 10:51:21 +0200
commit9a07f80b235382232ba3c3f34c83e2ce8931aaa8 (patch)
treef9a7c76076d5bb3f421b604a270ec3e28903f8d0 /gui/src/main
parentfbdf3932b450ab65940f9f006db05cd35ff10704 (diff)
downloadmullvadvpn-9a07f80b235382232ba3c3f34c83e2ce8931aaa8.tar.xz
mullvadvpn-9a07f80b235382232ba3c3f34c83e2ce8931aaa8.zip
Remember history when replacing window
Diffstat (limited to 'gui/src/main')
-rw-r--r--gui/src/main/index.ts9
1 files changed, 8 insertions, 1 deletions
diff --git a/gui/src/main/index.ts b/gui/src/main/index.ts
index c39ccdbc5c..0950db76a5 100644
--- a/gui/src/main/index.ts
+++ b/gui/src/main/index.ts
@@ -43,7 +43,7 @@ import {
import { messages, relayLocations } from '../shared/gettext';
import { SYSTEM_PREFERRED_LOCALE_KEY } from '../shared/gui-settings-state';
import { ITranslations, MacOsScrollbarVisibility } from '../shared/ipc-schema';
-import { IChangelog, ICurrentAppVersionInfo } from '../shared/ipc-types';
+import { IChangelog, ICurrentAppVersionInfo, IHistoryObject } from '../shared/ipc-types';
import log, { ConsoleOutput, Logger } from '../shared/logging';
import { LogLevel } from '../shared/logging-types';
import {
@@ -252,6 +252,8 @@ class ApplicationMain {
private changelog?: IChangelog;
+ private navigationHistory?: IHistoryObject;
+
public run() {
// Remove window animations to combat window flickering when opening window. Can be removed when
// this issue has been resolved: https://github.com/electron/electron/issues/12130
@@ -1273,6 +1275,7 @@ class ApplicationMain {
windowsSplitTunnelingApplications: this.windowsSplitTunnelingApplications,
macOsScrollbarVisibility: this.macOsScrollbarVisibility,
changelog: this.changelog ?? [],
+ navigationHistory: this.navigationHistory,
}));
IpcMainEventChannel.settings.handleSetAllowLan((allowLan: boolean) =>
@@ -1486,6 +1489,10 @@ class ApplicationMain {
this.guiSettings.changelogDisplayedForVersion = this.currentVersion.gui;
});
+ IpcMainEventChannel.navigation.handleSetHistory((history) => {
+ this.navigationHistory = history;
+ });
+
if (windowsSplitTunneling) {
this.guiSettings.browsedForSplitTunnelingApplications.forEach(
windowsSplitTunneling.addApplicationPathToCache,