reload returns promise
This commit is contained in:
parent
9a478d960a
commit
e312f40a84
@ -68,8 +68,8 @@ export class UserPreferenceService extends GenericService<UserAttributes> {
|
||||
window.location.reload();
|
||||
}
|
||||
|
||||
reload(): void {
|
||||
this.getAll<UserAttributes>()
|
||||
reload(): Promise<void> {
|
||||
return this.getAll<UserAttributes>()
|
||||
.toPromise()
|
||||
.then(attributes => {
|
||||
this._userAttributes = attributes ?? {};
|
||||
|
||||
@ -23,8 +23,7 @@ export function configurationInitializer(
|
||||
switchMap(loggedIn => (!loggedIn ? throwError('Not Logged In') : of({}))),
|
||||
mergeMapTo(generalSettingsService.getGeneralConfigurations()),
|
||||
tap(configuration => configService.updateDisplayName(configuration.displayName)),
|
||||
tap(() => userPreferenceService.reload()),
|
||||
tap(() => languageService.chooseAndSetInitialLanguage()),
|
||||
tap(() => userPreferenceService.reload().then(() => languageService.chooseAndSetInitialLanguage())),
|
||||
catchError(() => {
|
||||
title.setTitle('RedactManager');
|
||||
return of({});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user