From d7d45a8a6622df4b11e68afa99f26bcae25fb826 Mon Sep 17 00:00:00 2001 From: Marcos Rodriguez Velez Date: Fri, 17 May 2024 08:52:17 -0400 Subject: [PATCH] ADD: Provide explanation for disabled feature --- loc/en.json | 1 + screen/settings/SettingsPrivacy.tsx | 44 +++++++++++++++-------------- 2 files changed, 24 insertions(+), 21 deletions(-) diff --git a/loc/en.json b/loc/en.json index c09a2ce4d..d6797d274 100644 --- a/loc/en.json +++ b/loc/en.json @@ -277,6 +277,7 @@ "encrypt_title": "Security", "encrypt_tstorage": "Storage", "encrypt_use": "Use {type}", + "encrypted_feature_disabled": "This feature cannot be used with encrypted storage enabled.", "encrypt_use_expl": "{type} will be used to confirm your identity before making a transaction, unlocking, exporting, or deleting a wallet. {type} will not be used to unlock encrypted storage.", "biometrics_fail": "If {type} is not enabled, or fails to unlock, you can use your device passcode as an alternative.", "general": "General", diff --git a/screen/settings/SettingsPrivacy.tsx b/screen/settings/SettingsPrivacy.tsx index 3b9e95b38..f26814152 100644 --- a/screen/settings/SettingsPrivacy.tsx +++ b/screen/settings/SettingsPrivacy.tsx @@ -123,24 +123,24 @@ const SettingsPrivacy: React.FC = () => { - {!storageIsEncrypted && ( - <> - - - {loc.settings.privacy_quickactions_explanation} - - - )} + + {} + + {loc.settings.privacy_quickactions_explanation} + + {storageIsEncrypted && {loc.settings.encrypted_feature_disabled}} + + { {loc.settings.privacy_do_not_track_explanation} - {Platform.OS === 'ios' && !storageIsEncrypted && ( + {Platform.OS === 'ios' && ( <> @@ -162,12 +162,14 @@ const SettingsPrivacy: React.FC = () => { Component={TouchableWithoutFeedback} switch={{ onValueChange: onWidgetsTotalBalanceValueChange, - value: isWidgetBalanceDisplayAllowed, - disabled: isLoading === SettingsPrivacySection.All, + value: storageIsEncrypted ? false : isWidgetBalanceDisplayAllowed, + disabled: isLoading === SettingsPrivacySection.All || storageIsEncrypted, }} /> {loc.settings.total_balance_explanation} + + {storageIsEncrypted && {loc.settings.encrypted_feature_disabled}} )}