From 4c1aaaf41614a361199befadbce8003808ae5b52 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Tue, 8 Sep 2020 17:16:34 +0200 Subject: [PATCH] show "setting up encryption keys..." step during login --- src/domain/SessionLoadViewModel.js | 2 ++ src/matrix/SessionContainer.js | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/domain/SessionLoadViewModel.js b/src/domain/SessionLoadViewModel.js index e747ce00..fbb96986 100644 --- a/src/domain/SessionLoadViewModel.js +++ b/src/domain/SessionLoadViewModel.js @@ -127,6 +127,8 @@ export class SessionLoadViewModel extends ViewModel { return `Something went wrong while checking your login and password.`; } break; + case LoadStatus.SessionSetup: + return `Setting up your encryption keys…`; case LoadStatus.Loading: return `Loading your conversations…`; case LoadStatus.FirstSync: diff --git a/src/matrix/SessionContainer.js b/src/matrix/SessionContainer.js index 9b64115f..c07190eb 100644 --- a/src/matrix/SessionContainer.js +++ b/src/matrix/SessionContainer.js @@ -28,6 +28,7 @@ export const LoadStatus = createEnum( "Login", "LoginFailed", "Loading", + "SessionSetup", // upload e2ee keys, ... "Migrating", //not used atm, but would fit here "FirstSync", "Error", @@ -154,6 +155,7 @@ export class SessionContainer { this._session = new Session({storage: this._storage, sessionInfo: filteredSessionInfo, hsApi, olm, clock: this._clock}); await this._session.load(); + this._status.set(LoadStatus.SessionSetup); await this._session.beforeFirstSync(isNewLogin); this._sync = new Sync({hsApi, storage: this._storage, session: this._session});