mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-02-03 11:46:35 +00:00
- Add disable exchange to the export/import flow
- Save changes to Disable Exchange
This commit is contained in:
parent
c235df8935
commit
8b333f2925
2 changed files with 12 additions and 0 deletions
|
@ -216,6 +216,7 @@ class BackupService {
|
||||||
final displayActionListMode = data[PreferencesKey.displayActionListModeKey] as int?;
|
final displayActionListMode = data[PreferencesKey.displayActionListModeKey] as int?;
|
||||||
final currentPinLength = data[PreferencesKey.currentPinLength] as int?;
|
final currentPinLength = data[PreferencesKey.currentPinLength] as int?;
|
||||||
final currentTheme = data[PreferencesKey.currentTheme] as int?;
|
final currentTheme = data[PreferencesKey.currentTheme] as int?;
|
||||||
|
final disableExchange = data[PreferencesKey.disableExchangeKey] as bool?;
|
||||||
final currentDefaultSettingsMigrationVersion = data[PreferencesKey.currentDefaultSettingsMigrationVersion] as int?;
|
final currentDefaultSettingsMigrationVersion = data[PreferencesKey.currentDefaultSettingsMigrationVersion] as int?;
|
||||||
final moneroTransactionPriority = data[PreferencesKey.moneroTransactionPriority] as int?;
|
final moneroTransactionPriority = data[PreferencesKey.moneroTransactionPriority] as int?;
|
||||||
final bitcoinTransactionPriority = data[PreferencesKey.bitcoinTransactionPriority] as int?;
|
final bitcoinTransactionPriority = data[PreferencesKey.bitcoinTransactionPriority] as int?;
|
||||||
|
@ -274,6 +275,10 @@ class BackupService {
|
||||||
await _sharedPreferences.setInt(
|
await _sharedPreferences.setInt(
|
||||||
PreferencesKey.currentTheme, currentTheme);
|
PreferencesKey.currentTheme, currentTheme);
|
||||||
|
|
||||||
|
if (disableExchange != null)
|
||||||
|
await _sharedPreferences.setBool(
|
||||||
|
PreferencesKey.disableExchangeKey, disableExchange);
|
||||||
|
|
||||||
if (currentDefaultSettingsMigrationVersion != null)
|
if (currentDefaultSettingsMigrationVersion != null)
|
||||||
await _sharedPreferences.setInt(
|
await _sharedPreferences.setInt(
|
||||||
PreferencesKey.currentDefaultSettingsMigrationVersion,
|
PreferencesKey.currentDefaultSettingsMigrationVersion,
|
||||||
|
@ -421,6 +426,8 @@ class BackupService {
|
||||||
_sharedPreferences.getInt(PreferencesKey.displayActionListModeKey),
|
_sharedPreferences.getInt(PreferencesKey.displayActionListModeKey),
|
||||||
PreferencesKey.currentTheme:
|
PreferencesKey.currentTheme:
|
||||||
_sharedPreferences.getInt(PreferencesKey.currentTheme),
|
_sharedPreferences.getInt(PreferencesKey.currentTheme),
|
||||||
|
PreferencesKey.disableExchangeKey:
|
||||||
|
_sharedPreferences.getBool(PreferencesKey.disableExchangeKey),
|
||||||
PreferencesKey.currentDefaultSettingsMigrationVersion: _sharedPreferences
|
PreferencesKey.currentDefaultSettingsMigrationVersion: _sharedPreferences
|
||||||
.getInt(PreferencesKey.currentDefaultSettingsMigrationVersion),
|
.getInt(PreferencesKey.currentDefaultSettingsMigrationVersion),
|
||||||
PreferencesKey.bitcoinTransactionPriority:
|
PreferencesKey.bitcoinTransactionPriority:
|
||||||
|
|
|
@ -114,6 +114,11 @@ abstract class SettingsStoreBase with Store {
|
||||||
(BalanceDisplayMode mode) => sharedPreferences.setInt(
|
(BalanceDisplayMode mode) => sharedPreferences.setInt(
|
||||||
PreferencesKey.currentBalanceDisplayModeKey, mode.serialize()));
|
PreferencesKey.currentBalanceDisplayModeKey, mode.serialize()));
|
||||||
|
|
||||||
|
reaction(
|
||||||
|
(_) => disableExchange,
|
||||||
|
(bool disableExchange) => sharedPreferences.setBool(
|
||||||
|
PreferencesKey.disableExchangeKey, disableExchange));
|
||||||
|
|
||||||
this
|
this
|
||||||
.nodes
|
.nodes
|
||||||
.observe((change) {
|
.observe((change) {
|
||||||
|
|
Loading…
Reference in a new issue