From a49574cf7278894e43d6b53aab454c6e51258efe Mon Sep 17 00:00:00 2001 From: Leonardo Mendoza Fernadez Date: Sun, 24 Nov 2024 22:40:36 -0600 Subject: [PATCH] singin-interstitial --- src/app/authorize/authorize.module.ts | 2 -- .../share-emails-domains-dialog.component.ts | 9 +++++---- .../share-emails-domains.component.ts | 15 ++++++++------- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/app/authorize/authorize.module.ts b/src/app/authorize/authorize.module.ts index 518cf9d81..62ada5163 100644 --- a/src/app/authorize/authorize.module.ts +++ b/src/app/authorize/authorize.module.ts @@ -16,7 +16,6 @@ import { OauthErrorComponent } from './components/oauth-error/oauth-error.compon import { AuthorizeComponent } from './pages/authorize/authorize.component' import { FormAuthorizeComponent } from './components/form-authorize/form-authorize.component' import { InterstitialsModule } from '../cdk/interstitials/interstitials.module' -import { MatLegacyDialogModule } from '@angular/material/legacy-dialog' @NgModule({ declarations: [ @@ -38,7 +37,6 @@ import { MatLegacyDialogModule } from '@angular/material/legacy-dialog' InfoDropDownModule, MatProgressBarModule, InterstitialsModule, - MatLegacyDialogModule, ], }) export class AuthorizeModule {} diff --git a/src/app/cdk/interstitials/share-emails-domains/share-emails-domains-dialog.component.ts b/src/app/cdk/interstitials/share-emails-domains/share-emails-domains-dialog.component.ts index 78c131f08..4f14df78b 100644 --- a/src/app/cdk/interstitials/share-emails-domains/share-emails-domains-dialog.component.ts +++ b/src/app/cdk/interstitials/share-emails-domains/share-emails-domains-dialog.component.ts @@ -44,9 +44,10 @@ export class ShareEmailsDomainsDialogComponent extends ShareEmailsDomainsCompone } override finishIntertsitial(emails?: string[]) { - this.finish.emit() - if (this.dialogRef.getState() === MatLegacyDialogState.OPEN) { - this.dialogRef.close(emails) - } + this.dialogRef.close(emails) + } + + override afterEmailUpdates() { + this.finishIntertsitial() } } diff --git a/src/app/cdk/interstitials/share-emails-domains/share-emails-domains.component.ts b/src/app/cdk/interstitials/share-emails-domains/share-emails-domains.component.ts index 1114e2ea3..a65b05537 100644 --- a/src/app/cdk/interstitials/share-emails-domains/share-emails-domains.component.ts +++ b/src/app/cdk/interstitials/share-emails-domains/share-emails-domains.component.ts @@ -89,13 +89,7 @@ export class ShareEmailsDomainsComponent { this.recordEmailsService.postEmails(this.userEmailsJson).subscribe( (response) => { - if (!this.dialogMode) { - this.afterSummit = true - this.beforeSummit = false - } else { - this.finishIntertsitial(this.domainToMakePublic) - } - setTimeout(() => {}, 10000) + this.afterEmailUpdates() }, (error) => this.finishIntertsitial() ) @@ -103,6 +97,13 @@ export class ShareEmailsDomainsComponent { this.finishIntertsitial() } } + afterEmailUpdates() { + this.afterSummit = true + this.beforeSummit = false + setTimeout(() => { + this.finishIntertsitial() + }, 10000) + } finishIntertsitial(emails?: string[]) { this.finish.emit()