mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-10-26 06:08:40 +01:00
[CW-233] Fix missing display balance setting
This commit is contained in:
@@ -116,6 +116,9 @@ abstract class SettingsViewModelBase with Store {
|
||||
BalanceDisplayMode get balanceDisplayMode =>
|
||||
_settingsStore.balanceDisplayMode;
|
||||
|
||||
@computed
|
||||
bool get shouldDisplayBalance => balanceDisplayMode == BalanceDisplayMode.displayableBalance;
|
||||
|
||||
@computed
|
||||
bool get shouldSaveRecipientAddress =>
|
||||
_settingsStore.shouldSaveRecipientAddress;
|
||||
@@ -195,6 +198,15 @@ abstract class SettingsViewModelBase with Store {
|
||||
_settingsStore.currentTheme = newTheme;
|
||||
}
|
||||
|
||||
@action
|
||||
void setShouldDisplayBalance(bool value){
|
||||
if (value) {
|
||||
_settingsStore.balanceDisplayMode = BalanceDisplayMode.displayableBalance;
|
||||
} else {
|
||||
_settingsStore.balanceDisplayMode = BalanceDisplayMode.hiddenBalance;
|
||||
}
|
||||
}
|
||||
|
||||
String getDisplayPriority(dynamic priority) {
|
||||
final _priority = priority as TransactionPriority;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user