diff --git a/libs/tools/send/send-ui/src/send-form/components/send-details/base-send-details.component.ts b/libs/tools/send/send-ui/src/send-form/components/send-details/base-send-details.component.ts index 4751775b7fe..282f6caffab 100644 --- a/libs/tools/send/send-ui/src/send-form/components/send-details/base-send-details.component.ts +++ b/libs/tools/send/send-ui/src/send-form/components/send-details/base-send-details.component.ts @@ -48,7 +48,6 @@ export class BaseSendDetailsComponent implements OnInit { protected i18nService: I18nService, protected datePipe: DatePipe, ) { - // Initialize the form this.sendDetailsForm = this.formBuilder.group({ name: new FormControl("", Validators.required), selectedDeletionDatePreset: new FormControl(DatePreset.SevenDays || "", Validators.required), diff --git a/libs/tools/send/send-ui/src/send-form/components/send-details/send-text-details.component.ts b/libs/tools/send/send-ui/src/send-form/components/send-details/send-text-details.component.ts index acc27482786..56a8506f17c 100644 --- a/libs/tools/send/send-ui/src/send-form/components/send-details/send-text-details.component.ts +++ b/libs/tools/send/send-ui/src/send-form/components/send-details/send-text-details.component.ts @@ -50,10 +50,8 @@ export class SendTextDetailsComponent implements OnInit { private formBuilder: FormBuilder, protected sendFormContainer: SendFormContainer, ) { - // Subscribe to form value changes and update the parent SendView accordingly this.sendTextDetailsForm.valueChanges.pipe(takeUntilDestroyed()).subscribe((value) => { this.sendFormContainer.patchSend((send) => { - // Update the send object with the form values return Object.assign(send, { text: { text: value.text, @@ -65,7 +63,6 @@ export class SendTextDetailsComponent implements OnInit { } ngOnInit() { - // Define the nested form group for `text` this.baseSendTextDetailsForm = this.formBuilder.group({ text: new FormControl("", Validators.required), hidden: new FormControl(false), @@ -73,10 +70,8 @@ export class SendTextDetailsComponent implements OnInit { this.sendTextDetailsForm = Object.assign(this.baseSendTextDetailsForm, this.sendDetailsForm); - // Register this form with the parent form this.sendFormContainer.registerChildForm("sendTextDetailsForm", this.sendTextDetailsForm); - // If editing or cloning an existing SendView, populate the form if (this.originalSendView) { this.baseSendTextDetailsForm.patchValue({ text: this.originalSendView.text?.text || "",