CW-370-add-options-to-enable-disable-buy-and-sell-actions (#920)

* feat: In the privacy settings screen, add 2 options to Enable/Disable Buy and Sell actions

* fix: add strings

* fix: add the rest of the strings

* fix: disable instead of hide buy & sell buttons

* fix: use disableSell

* fix: main actions able to be onTapped even when disabled
This commit is contained in:
Rafael Saes
2023-05-15 15:26:56 +03:00
committed by GitHub
parent 0f44bc094f
commit 7fa7c45c0c
30 changed files with 175 additions and 56 deletions
+15 -3
View File
@@ -50,11 +50,23 @@ class PrivacyPage extends BasePage {
_privacySettingsViewModel.setShouldSaveRecipientAddress(value);
}),
if (Platform.isAndroid)
SettingsSwitcherCell(
title: S.current.prevent_screenshots,
value: _privacySettingsViewModel.isAppSecure,
onValueChange: (BuildContext _, bool value) {
_privacySettingsViewModel.setIsAppSecure(value);
}),
SettingsSwitcherCell(
title: S.current.prevent_screenshots,
value: _privacySettingsViewModel.isAppSecure,
title: S.current.disable_buy,
value: _privacySettingsViewModel.disableBuy,
onValueChange: (BuildContext _, bool value) {
_privacySettingsViewModel.setIsAppSecure(value);
_privacySettingsViewModel.setDisableBuy(value);
}),
SettingsSwitcherCell(
title: S.current.disable_sell,
value: _privacySettingsViewModel.disableSell,
onValueChange: (BuildContext _, bool value) {
_privacySettingsViewModel.setDisableSell(value);
}),
],
);