mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-11-17 01:37:40 +00:00
CAKE-222 | fixed transaction priority picker on the settings screen; added check of priority for wallet type
This commit is contained in:
parent
2dc5489a8e
commit
9b041dbe1e
1 changed files with 10 additions and 1 deletions
|
@ -35,6 +35,14 @@ abstract class SettingsViewModelBase with Store {
|
||||||
currentVersion = '';
|
currentVersion = '';
|
||||||
PackageInfo.fromPlatform().then(
|
PackageInfo.fromPlatform().then(
|
||||||
(PackageInfo packageInfo) => currentVersion = packageInfo.version);
|
(PackageInfo packageInfo) => currentVersion = packageInfo.version);
|
||||||
|
|
||||||
|
final priority = _settingsStore.transactionPriority;
|
||||||
|
|
||||||
|
if (!TransactionPriority.forWalletType(_walletType).contains(priority)) {
|
||||||
|
_settingsStore.transactionPriority =
|
||||||
|
TransactionPriority.forWalletType(_walletType).first;
|
||||||
|
}
|
||||||
|
|
||||||
sections = [
|
sections = [
|
||||||
[
|
[
|
||||||
if ((wallet.balance.availableModes as List).length > 1)
|
if ((wallet.balance.availableModes as List).length > 1)
|
||||||
|
@ -55,7 +63,8 @@ abstract class SettingsViewModelBase with Store {
|
||||||
title: S.current.settings_fee_priority,
|
title: S.current.settings_fee_priority,
|
||||||
items: TransactionPriority.forWalletType(wallet.type),
|
items: TransactionPriority.forWalletType(wallet.type),
|
||||||
selectedItem: () => transactionPriority,
|
selectedItem: () => transactionPriority,
|
||||||
isAlwaysShowScrollThumb: true,
|
isAlwaysShowScrollThumb:
|
||||||
|
TransactionPriority.forWalletType(wallet.type).length > 3,
|
||||||
onItemSelected: (TransactionPriority priority) =>
|
onItemSelected: (TransactionPriority priority) =>
|
||||||
_settingsStore.transactionPriority = priority),
|
_settingsStore.transactionPriority = priority),
|
||||||
SwitcherListItem(
|
SwitcherListItem(
|
||||||
|
|
Loading…
Reference in a new issue