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 { listUserChannels } from '@app/helpers'
+import { listUserChannelsForSelect } 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'
ngOnInit () {
this.buildForm({})
- listUserChannels(this.authService)
+ listUserChannelsForSelect(this.authService)
.subscribe(channels => {
this.userVideoChannels = channels
this.firstStepChannelId = this.userVideoChannels[0].id
})
}
- checkForm () {
- this.forceCheck()
-
- return this.form.valid
- }
-
protected updateVideoAndCaptions (video: VideoEdit) {
this.loadingBar.useRef().start()
})
)
}
+
+ protected async isFormValid () {
+ await this.waitPendingCheck()
+ this.forceCheck()
+
+ return this.form.valid
+ }
}