summaryrefslogtreecommitdiffhomepage
path: root/gui/src/renderer
diff options
context:
space:
mode:
authorOskar Nyberg <oskar@mullvad.net>2022-03-31 15:55:34 +0200
committerOskar Nyberg <oskar@mullvad.net>2022-04-04 12:00:01 +0200
commitd5385e0b7e66a75c3b4ed57fa000b0f03efebb39 (patch)
tree5db4272147d2396782af24de940c7839185867b4 /gui/src/renderer
parent600414493597fb49357becdf2616e453f726dd19 (diff)
downloadmullvadvpn-d5385e0b7e66a75c3b4ed57fa000b0f03efebb39.tar.xz
mullvadvpn-d5385e0b7e66a75c3b4ed57fa000b0f03efebb39.zip
Show launch view before receiving device config
Diffstat (limited to 'gui/src/renderer')
-rw-r--r--gui/src/renderer/app.tsx5
1 files changed, 4 insertions, 1 deletions
diff --git a/gui/src/renderer/app.tsx b/gui/src/renderer/app.tsx
index 4d86e183cc..6e29794a83 100644
--- a/gui/src/renderer/app.tsx
+++ b/gui/src/renderer/app.tsx
@@ -99,6 +99,7 @@ export default class AppRenderer {
private tunnelState!: TunnelState;
private settings!: ISettings;
private deviceConfig?: IDeviceConfig;
+ private hasReceivedDeviceConfig = false;
private guiSettings!: IGuiSettingsState;
private loginState: LoginState = 'none';
private previousLoginState: LoginState = 'none';
@@ -130,6 +131,7 @@ export default class AppRenderer {
IpcRendererEventChannel.account.listenDevice((deviceEvent) => {
const oldDeviceConfig = this.deviceConfig;
+ this.hasReceivedDeviceConfig = true;
this.handleAccountChange(deviceEvent, oldDeviceConfig?.accountToken);
});
@@ -205,6 +207,7 @@ export default class AppRenderer {
this.setAccountExpiry(initialState.accountData?.expiry);
this.setSettings(initialState.settings);
this.handleAccountChange({ deviceConfig: initialState.deviceConfig }, undefined);
+ this.hasReceivedDeviceConfig = initialState.hasReceivedDeviceConfig;
this.setAccountHistory(initialState.accountHistory);
this.setTunnelState(initialState.tunnelState);
this.updateBlockedState(initialState.tunnelState, initialState.settings.blockWhenDisconnected);
@@ -696,7 +699,7 @@ export default class AppRenderer {
}
private getNavigationBase(): RoutePath {
- if (this.connectedToDaemon) {
+ if (this.connectedToDaemon && this.hasReceivedDeviceConfig) {
const loginState = this.reduxStore.getState().account.status;
const deviceRevoked = loginState.type === 'none' && loginState.deviceRevoked;