From afffee21f2a1629f13d36c19fdb81bf470491e68 Mon Sep 17 00:00:00 2001 From: Mahmut Gundogdu Date: Fri, 25 Nov 2022 13:13:24 +0300 Subject: [PATCH] Remove isSameDataFunction --- .../personal-settings.component.ts | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/npm/ng-packs/packages/account/src/lib/components/personal-settings/personal-settings.component.ts b/npm/ng-packs/packages/account/src/lib/components/personal-settings/personal-settings.component.ts index 6ec15b1667..060cef712c 100644 --- a/npm/ng-packs/packages/account/src/lib/components/personal-settings/personal-settings.component.ts +++ b/npm/ng-packs/packages/account/src/lib/components/personal-settings/personal-settings.component.ts @@ -36,7 +36,6 @@ export class PersonalSettingsComponent form: UntypedFormGroup; inProgress: boolean; - private profile: ProfileDto; constructor( private fb: UntypedFormBuilder, @@ -79,24 +78,12 @@ export class PersonalSettingsComponent }); } - isDataSame(oldValue, newValue) { - return Object.entries(oldValue).some(([key, value]) => { - if (key in newValue) { - return value !== newValue[key]; - } - return false; - }); - } - logoutConfirmation = () => { this.authService.logout().subscribe(); }; private isLogoutConfirmMessageActive() { - if (!this.isPersonalSettingsChangedConfirmationActive) { - return false; - } - return this.isDataSame(this.profile, this.form.value); + return this.isPersonalSettingsChangedConfirmationActive; } private showLogoutConfirmMessage() {