Refactor my-subscribe-button to support full account subscription
[oweals/peertube.git] / client / src / app / +my-account / my-account-video-playlists / my-account-video-playlist-create.component.ts
index 8aed8b5135cc7f0d329e0542f8106674a0ed1565..e47e5f9807820c9d453e349926523cfb7b90cb1e 100644 (file)
@@ -47,15 +47,14 @@ export class MyAccountVideoPlaylistCreateComponent extends MyAccountVideoPlaylis
     populateAsyncUserVideoChannels(this.authService, this.userVideoChannels)
       .catch(err => console.error('Cannot populate user video channels.', err))
 
-    this.serverService.videoPlaylistPrivaciesLoaded.subscribe(
-      () => {
-        this.videoPlaylistPrivacies = this.serverService.getVideoPlaylistPrivacies()
+    this.serverService.getVideoPlaylistPrivacies()
+        .subscribe(videoPlaylistPrivacies => {
+          this.videoPlaylistPrivacies = videoPlaylistPrivacies
 
-        this.form.patchValue({
-          privacy: VideoPlaylistPrivacy.PRIVATE
+          this.form.patchValue({
+            privacy: VideoPlaylistPrivacy.PRIVATE
+          })
         })
-      }
-    )
   }
 
   formValidated () {