aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+my-account/my-account-video-playlists/my-account-video-playlist-update.component.ts
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/+my-account/my-account-video-playlists/my-account-video-playlist-update.component.ts')
-rw-r--r--client/src/app/+my-account/my-account-video-playlists/my-account-video-playlist-update.component.ts14
1 files changed, 9 insertions, 5 deletions
diff --git a/client/src/app/+my-account/my-account-video-playlists/my-account-video-playlist-update.component.ts b/client/src/app/+my-account/my-account-video-playlists/my-account-video-playlist-update.component.ts
index 917ad7258..2f85cdd96 100644
--- a/client/src/app/+my-account/my-account-video-playlists/my-account-video-playlist-update.component.ts
+++ b/client/src/app/+my-account/my-account-video-playlists/my-account-video-playlist-update.component.ts
@@ -1,7 +1,7 @@
1import { Component, OnDestroy, OnInit } from '@angular/core' 1import { Component, OnDestroy, OnInit } from '@angular/core'
2import { ActivatedRoute, Router } from '@angular/router' 2import { ActivatedRoute, Router } from '@angular/router'
3import { AuthService, Notifier, ServerService } from '@app/core' 3import { AuthService, Notifier, ServerService } from '@app/core'
4import { Subscription } from 'rxjs' 4import { forkJoin, Subscription } from 'rxjs'
5import { I18n } from '@ngx-translate/i18n-polyfill' 5import { I18n } from '@ngx-translate/i18n-polyfill'
6import { FormValidatorService } from '@app/shared/forms/form-validators/form-validator.service' 6import { FormValidatorService } from '@app/shared/forms/form-validators/form-validator.service'
7import { MyAccountVideoPlaylistEdit } from '@app/+my-account/my-account-video-playlists/my-account-video-playlist-edit' 7import { MyAccountVideoPlaylistEdit } from '@app/+my-account/my-account-video-playlists/my-account-video-playlist-edit'
@@ -56,13 +56,17 @@ export class MyAccountVideoPlaylistUpdateComponent extends MyAccountVideoPlaylis
56 this.paramsSub = this.route.params 56 this.paramsSub = this.route.params
57 .pipe( 57 .pipe(
58 map(routeParams => routeParams['videoPlaylistId']), 58 map(routeParams => routeParams['videoPlaylistId']),
59 switchMap(videoPlaylistId => this.videoPlaylistService.getVideoPlaylist(videoPlaylistId)), 59 switchMap(videoPlaylistId => {
60 delayWhen(() => this.serverService.videoPlaylistPrivaciesLoaded) 60 return forkJoin([
61 this.videoPlaylistService.getVideoPlaylist(videoPlaylistId),
62 this.serverService.getVideoPlaylistPrivacies()
63 ])
64 })
61 ) 65 )
62 .subscribe( 66 .subscribe(
63 videoPlaylistToUpdate => { 67 ([ videoPlaylistToUpdate, videoPlaylistPrivacies]) => {
64 this.videoPlaylistPrivacies = this.serverService.getVideoPlaylistPrivacies()
65 this.videoPlaylistToUpdate = videoPlaylistToUpdate 68 this.videoPlaylistToUpdate = videoPlaylistToUpdate
69 this.videoPlaylistPrivacies = videoPlaylistPrivacies
66 70
67 this.hydrateFormFromPlaylist() 71 this.hydrateFormFromPlaylist()
68 }, 72 },