show "setting up encryption keys..." step during login

This commit is contained in:
Bruno Windels 2020-09-08 17:16:34 +02:00
parent 36a8ec0110
commit 4c1aaaf416
2 changed files with 4 additions and 0 deletions

View file

@ -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:

View file

@ -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});