mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-05-03 22:12:13 +00:00
[skip ci] fix fiat settings display
This commit is contained in:
parent
37ca795756
commit
a1dd22232b
2 changed files with 6 additions and 1 deletions
lib
|
@ -34,7 +34,8 @@ class DisplaySettingsPage extends BasePage {
|
||||||
onValueChange: (_, bool value) {
|
onValueChange: (_, bool value) {
|
||||||
_displaySettingsViewModel.setShouldDisplayBalance(value);
|
_displaySettingsViewModel.setShouldDisplayBalance(value);
|
||||||
}),
|
}),
|
||||||
if (!isHaven)
|
//if (!isHaven) it does not work correctly
|
||||||
|
if(!_displaySettingsViewModel.disabledFiatApiMode)
|
||||||
SettingsPickerCell<FiatCurrency>(
|
SettingsPickerCell<FiatCurrency>(
|
||||||
title: S.current.settings_currency,
|
title: S.current.settings_currency,
|
||||||
searchHintText: S.current.search_currency,
|
searchHintText: S.current.search_currency,
|
||||||
|
|
|
@ -3,6 +3,7 @@ import 'package:cake_wallet/entities/fiat_currency.dart';
|
||||||
import 'package:cake_wallet/store/settings_store.dart';
|
import 'package:cake_wallet/store/settings_store.dart';
|
||||||
import 'package:cake_wallet/themes/theme_base.dart';
|
import 'package:cake_wallet/themes/theme_base.dart';
|
||||||
import 'package:mobx/mobx.dart';
|
import 'package:mobx/mobx.dart';
|
||||||
|
import 'package:cake_wallet/entities/fiat_api_mode.dart';
|
||||||
|
|
||||||
part 'display_settings_view_model.g.dart';
|
part 'display_settings_view_model.g.dart';
|
||||||
|
|
||||||
|
@ -30,6 +31,9 @@ abstract class DisplaySettingsViewModelBase with Store {
|
||||||
@computed
|
@computed
|
||||||
ThemeBase get theme => _settingsStore.currentTheme;
|
ThemeBase get theme => _settingsStore.currentTheme;
|
||||||
|
|
||||||
|
@computed
|
||||||
|
bool get disabledFiatApiMode => _settingsStore.fiatApiMode == FiatApiMode.disabled;
|
||||||
|
|
||||||
@action
|
@action
|
||||||
void setBalanceDisplayMode(BalanceDisplayMode value) => _settingsStore.balanceDisplayMode = value;
|
void setBalanceDisplayMode(BalanceDisplayMode value) => _settingsStore.balanceDisplayMode = value;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue