From bdcf1d6bdf32ee0614eb6560c9f69277aab821fc Mon Sep 17 00:00:00 2001 From: argirok Date: Mon, 4 Jul 2022 14:12:55 +0300 Subject: [PATCH] Customization: more changes for the new mocks --- connect/community/CustomizationOptions.ts | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/connect/community/CustomizationOptions.ts b/connect/community/CustomizationOptions.ts index dbadc970..988c758f 100644 --- a/connect/community/CustomizationOptions.ts +++ b/connect/community/CustomizationOptions.ts @@ -13,7 +13,8 @@ export class CustomizationOptions { secondaryColor: string; }; identityIsCustom:boolean; - backgroundsAndButtonsIsCustom:boolean; + backgroundsIsCustom:boolean; + buttonsIsCustom:boolean; backgrounds: { dark: { color: string; //background @@ -39,7 +40,8 @@ export class CustomizationOptions { secondaryColor : secondaryColor ? secondaryColor : CustomizationOptions.getIdentity().secondaryColor, }; this.identityIsCustom = false; - this.backgroundsAndButtonsIsCustom = false; + this.backgroundsIsCustom = false; + this.buttonsIsCustom = false; this.backgrounds={ dark : { color: this.identity.mainColor, @@ -121,8 +123,9 @@ export class CustomizationOptions { if(!current.hasOwnProperty('identityIsCustom')){ current.identityIsCustom = (JSON.stringify(current.identity) != JSON.stringify(defaultCO.identity)); } - if(!current.hasOwnProperty('backgroundsAndButtonsIsCustom')){ - current.identityIsCustom = (JSON.stringify(current.backgrounds) != JSON.stringify(updated.backgrounds) || JSON.stringify(current.buttons) != JSON.stringify(updated.buttons)) ; + if(!current.hasOwnProperty('backgroundsAndButtonsIsCustom') || (!current.hasOwnProperty('backgroundsIsCustom') || (!current.hasOwnProperty('buttonsIsCustom')))){ + current.identityIsCustom = (JSON.stringify(current.backgrounds) != + JSON.stringify(updated.backgrounds) || JSON.stringify(current.buttons) != JSON.stringify(updated.buttons)) ; } return current;