diff options
-rw-r--r-- | client/src/app/app.component.ts | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/client/src/app/app.component.ts b/client/src/app/app.component.ts index 86b687173..95af89b19 100644 --- a/client/src/app/app.component.ts +++ b/client/src/app/app.component.ts | |||
@@ -1,5 +1,5 @@ | |||
1 | import { Hotkey, HotkeysService } from 'angular2-hotkeys' | 1 | import { Hotkey, HotkeysService } from 'angular2-hotkeys' |
2 | import { forkJoin } from 'rxjs' | 2 | import { forkJoin, delay } from 'rxjs' |
3 | import { filter, first, map } from 'rxjs/operators' | 3 | import { filter, first, map } from 'rxjs/operators' |
4 | import { DOCUMENT, getLocaleDirection, PlatformLocation } from '@angular/common' | 4 | import { DOCUMENT, getLocaleDirection, PlatformLocation } from '@angular/common' |
5 | import { AfterViewInit, Component, Inject, LOCALE_ID, OnInit, ViewChild } from '@angular/core' | 5 | import { AfterViewInit, Component, Inject, LOCALE_ID, OnInit, ViewChild } from '@angular/core' |
@@ -223,7 +223,10 @@ export class AppComponent implements OnInit, AfterViewInit { | |||
223 | 223 | ||
224 | private openModalsIfNeeded () { | 224 | private openModalsIfNeeded () { |
225 | const userSub = this.authService.userInformationLoaded | 225 | const userSub = this.authService.userInformationLoaded |
226 | .pipe(map(() => this.authService.getUser())) | 226 | .pipe( |
227 | delay(0), // Wait for modals creations | ||
228 | map(() => this.authService.getUser()) | ||
229 | ) | ||
227 | 230 | ||
228 | // Admin modal | 231 | // Admin modal |
229 | userSub.pipe( | 232 | userSub.pipe( |