X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Fapp%2F%2Bmy-account%2Fmy-account-settings%2Fmy-account-video-settings%2Fmy-account-video-settings.component.ts;h=9e711a227be7144cf16e45bf08fa80bd6017405c;hb=64cc5e8575fda47b281ae20abf0020e27fc8ce7c;hp=36556706e1e8dbb042207d0c7e801543d42ccc3e;hpb=d879e48b216d34c9f9a51b33442ce082a954ed02;p=github%2FChocobozzz%2FPeerTube.git diff --git a/client/src/app/+my-account/my-account-settings/my-account-video-settings/my-account-video-settings.component.ts b/client/src/app/+my-account/my-account-settings/my-account-video-settings/my-account-video-settings.component.ts index 36556706e..9e711a227 100644 --- a/client/src/app/+my-account/my-account-settings/my-account-video-settings/my-account-video-settings.component.ts +++ b/client/src/app/+my-account/my-account-settings/my-account-video-settings/my-account-video-settings.component.ts @@ -5,7 +5,7 @@ import { AuthService } from '../../../core' import { FormReactive, User, UserService } from '../../../shared' import { I18n } from '@ngx-translate/i18n-polyfill' import { FormValidatorService } from '@app/shared/forms/form-validators/form-validator.service' -import { Subject } from 'rxjs/Subject' +import { Subject } from 'rxjs' @Component({ selector: 'my-account-video-settings', @@ -29,12 +29,14 @@ export class MyAccountVideoSettingsComponent extends FormReactive implements OnI ngOnInit () { this.buildForm({ nsfwPolicy: null, + webTorrentPolicy: null, autoPlayVideo: null }) this.userInformationLoaded.subscribe(() => { this.form.patchValue({ nsfwPolicy: this.user.nsfwPolicy, + webTorrentPolicy: this.user.webTorrentPolicy, autoPlayVideo: this.user.autoPlayVideo === true }) }) @@ -42,9 +44,11 @@ export class MyAccountVideoSettingsComponent extends FormReactive implements OnI updateDetails () { const nsfwPolicy = this.form.value['nsfwPolicy'] + const webTorrentPolicy = this.form.value['webTorrentPolicy'] const autoPlayVideo = this.form.value['autoPlayVideo'] const details: UserUpdateMe = { nsfwPolicy, + webTorrentPolicy, autoPlayVideo }