summaryrefslogtreecommitdiffhomepage
path: root/gui/src/renderer
diff options
context:
space:
mode:
authorOskar Nyberg <oskar@mullvad.net>2021-12-28 13:08:45 +0100
committerOskar Nyberg <oskar@mullvad.net>2022-01-24 16:41:25 +0100
commitc613f13f1570048768c4eb9ded97e9aa9eb9f4f3 (patch)
tree35a782578f5020e2f04d6f4f22fe095a00652796 /gui/src/renderer
parent127fdb5bc7e9ca10ca4ce690ff1e986a2732a8c2 (diff)
downloadmullvadvpn-c613f13f1570048768c4eb9ded97e9aa9eb9f4f3.tar.xz
mullvadvpn-c613f13f1570048768c4eb9ded97e9aa9eb9f4f3.zip
Disable background throttling while resetting navigation while in background
Diffstat (limited to 'gui/src/renderer')
-rw-r--r--gui/src/renderer/app.tsx4
-rw-r--r--gui/src/renderer/lib/history.tsx4
2 files changed, 5 insertions, 3 deletions
diff --git a/gui/src/renderer/app.tsx b/gui/src/renderer/app.tsx
index 7fc2411855..7b4b63c969 100644
--- a/gui/src/renderer/app.tsx
+++ b/gui/src/renderer/app.tsx
@@ -177,7 +177,9 @@ export default class AppRenderer {
this.reduxActions.userInterface.setMacOsScrollbarVisibility(visibility);
});
- IpcRendererEventChannel.navigation.listenReset(() => this.history.dismiss(true));
+ IpcRendererEventChannel.navigation.listenReset(() =>
+ this.history.dismiss(true, transitions.none),
+ );
// Request the initial state from the main process
const initialState = IpcRendererEventChannel.state.get();
diff --git a/gui/src/renderer/lib/history.tsx b/gui/src/renderer/lib/history.tsx
index a391e70fee..4abdcd5fcb 100644
--- a/gui/src/renderer/lib/history.tsx
+++ b/gui/src/renderer/lib/history.tsx
@@ -88,9 +88,9 @@ export default class History {
this.notify(transitions.show);
};
- public dismiss = (all?: boolean) => {
+ public dismiss = (all?: boolean, transition = transitions.dismiss) => {
if (this.popImpl(all ? this.index : 1)) {
- this.notify(transitions.dismiss);
+ this.notify(transition);
}
};