Optimized get/set subscription process

This commit is contained in:
Isaac Abadi
2020-12-22 01:24:50 -05:00
parent 88a1c31090
commit 2656147570
2 changed files with 13 additions and 3 deletions

View File

@@ -61,9 +61,13 @@ export class EditSubscriptionDialogComponent implements OnInit {
];
constructor(@Inject(MAT_DIALOG_DATA) public data: any, private dialog: MatDialog, private postsService: PostsService) {
this.sub = this.data.sub;
this.sub = JSON.parse(JSON.stringify(this.data.sub));
this.new_sub = JSON.parse(JSON.stringify(this.sub));
// ignore videos to keep requests small
delete this.sub['videos'];
delete this.new_sub['videos'];
this.audioOnlyMode = this.sub.type === 'audio';
this.download_all = !this.sub.timerange;