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/+videos | |
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/+videos')
-rw-r--r-- | client/src/app/+videos/+video-edit/video-add-components/video-send.ts | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/client/src/app/+videos/+video-edit/video-add-components/video-send.ts b/client/src/app/+videos/+video-edit/video-add-components/video-send.ts index 9a22024e5..3614499cd 100644 --- a/client/src/app/+videos/+video-edit/video-add-components/video-send.ts +++ b/client/src/app/+videos/+video-edit/video-add-components/video-send.ts | |||
@@ -2,7 +2,7 @@ import { catchError, switchMap, tap } from 'rxjs/operators' | |||
2 | import { SelectChannelItem } from 'src/types/select-options-item.model' | 2 | import { SelectChannelItem } from 'src/types/select-options-item.model' |
3 | import { Directive, EventEmitter, OnInit } from '@angular/core' | 3 | import { Directive, EventEmitter, OnInit } from '@angular/core' |
4 | import { AuthService, CanComponentDeactivateResult, Notifier, ServerService } from '@app/core' | 4 | import { AuthService, CanComponentDeactivateResult, Notifier, ServerService } from '@app/core' |
5 | import { populateAsyncUserVideoChannels } from '@app/helpers' | 5 | import { listUserChannels } from '@app/helpers' |
6 | import { FormReactive } from '@app/shared/shared-forms' | 6 | import { FormReactive } from '@app/shared/shared-forms' |
7 | import { VideoCaptionEdit, VideoCaptionService, VideoEdit, VideoService } from '@app/shared/shared-main' | 7 | import { VideoCaptionEdit, VideoCaptionService, VideoEdit, VideoService } from '@app/shared/shared-main' |
8 | import { LoadingBarService } from '@ngx-loading-bar/core' | 8 | import { LoadingBarService } from '@ngx-loading-bar/core' |
@@ -35,8 +35,11 @@ export abstract class VideoSend extends FormReactive implements OnInit { | |||
35 | ngOnInit () { | 35 | ngOnInit () { |
36 | this.buildForm({}) | 36 | this.buildForm({}) |
37 | 37 | ||
38 | populateAsyncUserVideoChannels(this.authService, this.userVideoChannels) | 38 | listUserChannels(this.authService) |
39 | .then(() => this.firstStepChannelId = this.userVideoChannels[ 0 ].id) | 39 | .subscribe(channels => { |
40 | this.userVideoChannels = channels | ||
41 | this.firstStepChannelId = this.userVideoChannels[0].id | ||
42 | }) | ||
40 | 43 | ||
41 | this.serverConfig = this.serverService.getTmpConfig() | 44 | this.serverConfig = this.serverService.getTmpConfig() |
42 | this.serverService.getConfig() | 45 | this.serverService.getConfig() |