diff options
author | Chocobozzz <me@florianbigard.com> | 2021-02-25 09:09:41 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-02-25 09:09:41 +0100 |
commit | 9556ce48e7d0aaed35753d982327bc60e1284894 (patch) | |
tree | 89509d43b0e8c11c4cc5dcfa4de275ba29a92500 /client/src/app/+my-library/my-video-playlists | |
parent | 9514bb3bc0534c2a8c5ffefac013a1b8d3717c0a (diff) | |
download | PeerTube-9556ce48e7d0aaed35753d982327bc60e1284894.tar.gz PeerTube-9556ce48e7d0aaed35753d982327bc60e1284894.tar.zst PeerTube-9556ce48e7d0aaed35753d982327bc60e1284894.zip |
Fix async issues with channels list
Diffstat (limited to 'client/src/app/+my-library/my-video-playlists')
-rw-r--r-- | client/src/app/+my-library/my-video-playlists/my-video-playlist-create.component.ts | 6 | ||||
-rw-r--r-- | client/src/app/+my-library/my-video-playlists/my-video-playlist-update.component.ts | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/client/src/app/+my-library/my-video-playlists/my-video-playlist-create.component.ts b/client/src/app/+my-library/my-video-playlists/my-video-playlist-create.component.ts index 5abea54b0..8606a875a 100644 --- a/client/src/app/+my-library/my-video-playlists/my-video-playlist-create.component.ts +++ b/client/src/app/+my-library/my-video-playlists/my-video-playlist-create.component.ts | |||
@@ -1,7 +1,7 @@ | |||
1 | import { Component, OnInit } from '@angular/core' | 1 | import { Component, OnInit } from '@angular/core' |
2 | import { Router } from '@angular/router' | 2 | import { Router } from '@angular/router' |
3 | import { AuthService, Notifier, ServerService } from '@app/core' | 3 | import { AuthService, Notifier, ServerService } from '@app/core' |
4 | import { populateAsyncUserVideoChannels } from '@app/helpers' | 4 | import { listUserChannels } from '@app/helpers' |
5 | import { | 5 | import { |
6 | setPlaylistChannelValidator, | 6 | setPlaylistChannelValidator, |
7 | VIDEO_PLAYLIST_CHANNEL_ID_VALIDATOR, | 7 | VIDEO_PLAYLIST_CHANNEL_ID_VALIDATOR, |
@@ -46,8 +46,8 @@ export class MyVideoPlaylistCreateComponent extends MyVideoPlaylistEdit implemen | |||
46 | setPlaylistChannelValidator(this.form.get('videoChannelId'), privacy) | 46 | setPlaylistChannelValidator(this.form.get('videoChannelId'), privacy) |
47 | }) | 47 | }) |
48 | 48 | ||
49 | populateAsyncUserVideoChannels(this.authService, this.userVideoChannels) | 49 | listUserChannels(this.authService) |
50 | .catch(err => console.error('Cannot populate user video channels.', err)) | 50 | .subscribe(channels => this.userVideoChannels = channels) |
51 | 51 | ||
52 | this.serverService.getVideoPlaylistPrivacies() | 52 | this.serverService.getVideoPlaylistPrivacies() |
53 | .subscribe(videoPlaylistPrivacies => { | 53 | .subscribe(videoPlaylistPrivacies => { |
diff --git a/client/src/app/+my-library/my-video-playlists/my-video-playlist-update.component.ts b/client/src/app/+my-library/my-video-playlists/my-video-playlist-update.component.ts index 532423ba2..c554d3772 100644 --- a/client/src/app/+my-library/my-video-playlists/my-video-playlist-update.component.ts +++ b/client/src/app/+my-library/my-video-playlists/my-video-playlist-update.component.ts | |||
@@ -3,7 +3,7 @@ import { map, switchMap } from 'rxjs/operators' | |||
3 | import { Component, OnDestroy, OnInit } from '@angular/core' | 3 | import { Component, OnDestroy, OnInit } from '@angular/core' |
4 | import { ActivatedRoute, Router } from '@angular/router' | 4 | import { ActivatedRoute, Router } from '@angular/router' |
5 | import { AuthService, Notifier, ServerService } from '@app/core' | 5 | import { AuthService, Notifier, ServerService } from '@app/core' |
6 | import { populateAsyncUserVideoChannels } from '@app/helpers' | 6 | import { listUserChannels } from '@app/helpers' |
7 | import { | 7 | import { |
8 | setPlaylistChannelValidator, | 8 | setPlaylistChannelValidator, |
9 | VIDEO_PLAYLIST_CHANNEL_ID_VALIDATOR, | 9 | VIDEO_PLAYLIST_CHANNEL_ID_VALIDATOR, |
@@ -51,8 +51,8 @@ export class MyVideoPlaylistUpdateComponent extends MyVideoPlaylistEdit implemen | |||
51 | setPlaylistChannelValidator(this.form.get('videoChannelId'), privacy) | 51 | setPlaylistChannelValidator(this.form.get('videoChannelId'), privacy) |
52 | }) | 52 | }) |
53 | 53 | ||
54 | populateAsyncUserVideoChannels(this.authService, this.userVideoChannels) | 54 | listUserChannels(this.authService) |
55 | .catch(err => console.error('Cannot populate user video channels.', err)) | 55 | .subscribe(channels => this.userVideoChannels = channels) |
56 | 56 | ||
57 | this.paramsSub = this.route.params | 57 | this.paramsSub = this.route.params |
58 | .pipe( | 58 | .pipe( |