92900: Move duplicate code to new InitService method

This commit is contained in:
Yura Bondarenko
2022-08-25 14:01:23 +02:00
parent 4b20b0cb81
commit e464c0f8c7
5 changed files with 44 additions and 179 deletions

View File

@@ -67,12 +67,7 @@ export class ServerInitService extends InitService {
this.initRouteListeners();
this.themeService.listenForThemeChanges(false);
// wait for auth to be ready
await this.store.pipe(
select(isAuthenticationBlocking),
distinctUntilChanged(),
find((b: boolean) => b === false)
).toPromise();
await this.authenticationReady$().toPromise();
return true;
};