]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commitdiff
Fix welcome modal when saving config
authorChocobozzz <me@florianbigard.com>
Wed, 27 Nov 2019 09:29:05 +0000 (10:29 +0100)
committerChocobozzz <me@florianbigard.com>
Wed, 27 Nov 2019 09:29:29 +0000 (10:29 +0100)
client/src/app/app.component.ts

index 1724bbd1ac440c99ed28b415e752a69c6849069f..f1658ca1bf3ec5f449066d3c40c9126e79b9a952 100644 (file)
@@ -4,7 +4,7 @@ import { Event, GuardsCheckStart, NavigationEnd, Router, Scroll } from '@angular
 import { AuthService, RedirectService, ServerService, ThemeService } from '@app/core'
 import { is18nPath } from '../../../shared/models/i18n'
 import { ScreenService } from '@app/shared/misc/screen.service'
-import { debounceTime, filter, map, pairwise, skip, switchMap } from 'rxjs/operators'
+import { debounceTime, filter, first, map, pairwise, skip, switchMap } from 'rxjs/operators'
 import { Hotkey, HotkeysService } from 'angular2-hotkeys'
 import { I18n } from '@ngx-translate/i18n-polyfill'
 import { fromEvent } from 'rxjs'
@@ -234,6 +234,7 @@ export class AppComponent implements OnInit {
   private async openModalsIfNeeded () {
     this.serverService.configLoaded
         .pipe(
+          first(),
           switchMap(() => this.authService.userInformationLoaded),
           map(() => this.authService.getUser()),
           filter(user => user.role === UserRole.ADMINISTRATOR)