mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-06-28 20:39:51 +00:00
Add toggle for disabling service bulletin (#1347)
* Add toggle for disabling service bulletin * Make the toggle functional * Fix + add toggle to Advanced Settings * Remove unused variable --------- Co-authored-by: Omar Hatem <omarh.ismail1@gmail.com>
This commit is contained in:
parent
bca59ad5e4
commit
4520f583a6
34 changed files with 78 additions and 2 deletions
|
@ -59,6 +59,7 @@ abstract class SettingsStoreBase with Store {
|
|||
required bool initialAppSecure,
|
||||
required bool initialDisableBuy,
|
||||
required bool initialDisableSell,
|
||||
required bool initialDisableBulletin,
|
||||
required WalletListOrderType initialWalletListOrder,
|
||||
required bool initialWalletListAscending,
|
||||
required FiatApiMode initialFiatMode,
|
||||
|
@ -130,6 +131,7 @@ abstract class SettingsStoreBase with Store {
|
|||
isAppSecure = initialAppSecure,
|
||||
disableBuy = initialDisableBuy,
|
||||
disableSell = initialDisableSell,
|
||||
disableBulletin = initialDisableBulletin,
|
||||
walletListOrder = initialWalletListOrder,
|
||||
walletListAscending = initialWalletListAscending,
|
||||
shouldShowMarketPlaceInDashboard = initialShouldShowMarketPlaceInDashboard,
|
||||
|
@ -291,6 +293,11 @@ abstract class SettingsStoreBase with Store {
|
|||
(bool disableSell) =>
|
||||
sharedPreferences.setBool(PreferencesKey.disableSellKey, disableSell));
|
||||
|
||||
reaction(
|
||||
(_) => disableBulletin,
|
||||
(bool disableBulletin) =>
|
||||
sharedPreferences.setBool(PreferencesKey.disableBulletinKey, disableBulletin));
|
||||
|
||||
reaction(
|
||||
(_) => walletListOrder,
|
||||
(WalletListOrderType walletListOrder) =>
|
||||
|
@ -553,6 +560,9 @@ abstract class SettingsStoreBase with Store {
|
|||
@observable
|
||||
bool disableSell;
|
||||
|
||||
@observable
|
||||
bool disableBulletin;
|
||||
|
||||
@observable
|
||||
WalletListOrderType walletListOrder;
|
||||
|
||||
|
@ -777,6 +787,7 @@ abstract class SettingsStoreBase with Store {
|
|||
final isAppSecure = sharedPreferences.getBool(PreferencesKey.isAppSecureKey) ?? false;
|
||||
final disableBuy = sharedPreferences.getBool(PreferencesKey.disableBuyKey) ?? false;
|
||||
final disableSell = sharedPreferences.getBool(PreferencesKey.disableSellKey) ?? false;
|
||||
final disableBulletin = sharedPreferences.getBool(PreferencesKey.disableBulletinKey) ?? false;
|
||||
final walletListOrder =
|
||||
WalletListOrderType.values[sharedPreferences.getInt(PreferencesKey.walletListOrder) ?? 0];
|
||||
final walletListAscending =
|
||||
|
@ -1029,6 +1040,7 @@ abstract class SettingsStoreBase with Store {
|
|||
initialAppSecure: isAppSecure,
|
||||
initialDisableBuy: disableBuy,
|
||||
initialDisableSell: disableSell,
|
||||
initialDisableBulletin: disableBulletin,
|
||||
initialWalletListOrder: walletListOrder,
|
||||
initialWalletListAscending: walletListAscending,
|
||||
initialFiatMode: currentFiatApiMode,
|
||||
|
@ -1147,6 +1159,7 @@ abstract class SettingsStoreBase with Store {
|
|||
isAppSecure = sharedPreferences.getBool(PreferencesKey.isAppSecureKey) ?? isAppSecure;
|
||||
disableBuy = sharedPreferences.getBool(PreferencesKey.disableBuyKey) ?? disableBuy;
|
||||
disableSell = sharedPreferences.getBool(PreferencesKey.disableSellKey) ?? disableSell;
|
||||
disableBulletin = sharedPreferences.getBool(PreferencesKey.disableBulletinKey) ?? disableBulletin;
|
||||
walletListOrder =
|
||||
WalletListOrderType.values[sharedPreferences.getInt(PreferencesKey.walletListOrder) ?? 0];
|
||||
walletListAscending = sharedPreferences.getBool(PreferencesKey.walletListAscending) ?? true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue