aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+videos
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-02-25 09:09:41 +0100
committerChocobozzz <me@florianbigard.com>2021-02-25 09:09:41 +0100
commit9556ce48e7d0aaed35753d982327bc60e1284894 (patch)
tree89509d43b0e8c11c4cc5dcfa4de275ba29a92500 /client/src/app/+videos
parent9514bb3bc0534c2a8c5ffefac013a1b8d3717c0a (diff)
downloadPeerTube-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.ts9
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'
2import { SelectChannelItem } from 'src/types/select-options-item.model' 2import { SelectChannelItem } from 'src/types/select-options-item.model'
3import { Directive, EventEmitter, OnInit } from '@angular/core' 3import { Directive, EventEmitter, OnInit } from '@angular/core'
4import { AuthService, CanComponentDeactivateResult, Notifier, ServerService } from '@app/core' 4import { AuthService, CanComponentDeactivateResult, Notifier, ServerService } from '@app/core'
5import { populateAsyncUserVideoChannels } from '@app/helpers' 5import { listUserChannels } from '@app/helpers'
6import { FormReactive } from '@app/shared/shared-forms' 6import { FormReactive } from '@app/shared/shared-forms'
7import { VideoCaptionEdit, VideoCaptionService, VideoEdit, VideoService } from '@app/shared/shared-main' 7import { VideoCaptionEdit, VideoCaptionService, VideoEdit, VideoService } from '@app/shared/shared-main'
8import { LoadingBarService } from '@ngx-loading-bar/core' 8import { 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()