From 21c4f3576fbbfd52b88eed7e3456f460eb190071 Mon Sep 17 00:00:00 2001 From: aj-rosado <109146700+aj-rosado@users.noreply.github.com> Date: Fri, 15 Sep 2023 12:50:38 +0100 Subject: [PATCH] HideEmail enable validation moved to UpdateFormValues (#6310) --- libs/angular/src/tools/send/add-edit.component.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/libs/angular/src/tools/send/add-edit.component.ts b/libs/angular/src/tools/send/add-edit.component.ts index 0827ad318cc..ffe0b6a4f9d 100644 --- a/libs/angular/src/tools/send/add-edit.component.ts +++ b/libs/angular/src/tools/send/add-edit.component.ts @@ -207,9 +207,6 @@ export class AddEditComponent implements OnInit, OnDestroy { this.send = await send.decrypt(); this.type = this.send.type; this.updateFormValues(); - if (this.send.hideEmail) { - this.formGroup.controls.hideEmail.enable(); - } } else { this.send = new SendView(); this.send.type = this.type; @@ -425,6 +422,10 @@ export class AddEditComponent implements OnInit, OnDestroy { "yyyy-MM-ddTHH:mm" ), }); + + if (this.send.hideEmail) { + this.formGroup.controls.hideEmail.enable(); + } } private async handleCopyLinkToClipboard() {