X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Fapp%2F%2Bvideos%2F%2Bvideo-edit%2Fvideo-add-components%2Fvideo-send.ts;h=3614499cdd27e856ed5487fc3205aeb427aa2448;hb=35f676e5d3e5e242e84ed63da2cc78117079c7cb;hp=812936d7a4d2549654c81c1e09325b54234c5690;hpb=52c4976fcf4ee255a3af68ff9778e4f5c4f84bd4;p=github%2FChocobozzz%2FPeerTube.git 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 812936d7a..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 @@ -1,8 +1,9 @@ import { catchError, switchMap, tap } from 'rxjs/operators' +import { SelectChannelItem } from 'src/types/select-options-item.model' import { Directive, EventEmitter, OnInit } from '@angular/core' import { AuthService, CanComponentDeactivateResult, Notifier, ServerService } from '@app/core' -import { populateAsyncUserVideoChannels } from '@app/helpers' -import { FormReactive, SelectChannelItem } from '@app/shared/shared-forms' +import { listUserChannels } from '@app/helpers' +import { FormReactive } from '@app/shared/shared-forms' import { VideoCaptionEdit, VideoCaptionService, VideoEdit, VideoService } from '@app/shared/shared-main' import { LoadingBarService } from '@ngx-loading-bar/core' import { ServerConfig, VideoConstant, VideoPrivacy } from '@shared/models' @@ -34,8 +35,11 @@ export abstract class VideoSend extends FormReactive implements OnInit { ngOnInit () { this.buildForm({}) - populateAsyncUserVideoChannels(this.authService, this.userVideoChannels) - .then(() => this.firstStepChannelId = this.userVideoChannels[ 0 ].id) + listUserChannels(this.authService) + .subscribe(channels => { + this.userVideoChannels = channels + this.firstStepChannelId = this.userVideoChannels[0].id + }) this.serverConfig = this.serverService.getTmpConfig() this.serverService.getConfig()