X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Fapp%2Fapp.component.ts;h=95af89b19d464297eedd49bf70e0139d7755c559;hb=db581cf7b99eb60d2e6d9bee5c020ef22b0a1a41;hp=86b687173158fa97eae218557a5b2f89d802983c;hpb=8f581725651c4b2c213d75fc028e306bbf239d3e;p=github%2FChocobozzz%2FPeerTube.git 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 @@ import { Hotkey, HotkeysService } from 'angular2-hotkeys' -import { forkJoin } from 'rxjs' +import { forkJoin, delay } from 'rxjs' import { filter, first, map } from 'rxjs/operators' import { DOCUMENT, getLocaleDirection, PlatformLocation } from '@angular/common' import { AfterViewInit, Component, Inject, LOCALE_ID, OnInit, ViewChild } from '@angular/core' @@ -223,7 +223,10 @@ export class AppComponent implements OnInit, AfterViewInit { private openModalsIfNeeded () { const userSub = this.authService.userInformationLoaded - .pipe(map(() => this.authService.getUser())) + .pipe( + delay(0), // Wait for modals creations + map(() => this.authService.getUser()) + ) // Admin modal userSub.pipe(