Merge branch 'CWA-168-add-app-version-text-in-settings' of github.com:cake-tech/cake_wallet into release-1.0.3

This commit is contained in:
Nadiia Hordenko 2020-01-29 19:07:44 +01:00
commit 60df5de3b7
3 changed files with 15 additions and 6 deletions

View file

@ -14,4 +14,5 @@ class ItemHeaders {
static const support = 'Support';
static const termsAndConditions = 'Terms and conditions';
static const faq = 'FAQ';
static const version = 'Version';
}

View file

@ -343,9 +343,9 @@ class SettingsFormState extends State<SettingsForm> {
final item = _items[index];
bool _isDrawDivider = true;
if (item.attribute == Attributes.header) {
if (item.attribute == Attributes.header || index == _items.length - 1) {
_isDrawDivider = false;
} else if (index < _items.length - 1) {
} else {
if (_items[index + 1].attribute == Attributes.header) {
_isDrawDivider = false;
}
@ -373,9 +373,13 @@ class SettingsFormState extends State<SettingsForm> {
],
);
}),
Container(
height: 20.0,
color: Theme.of(context).accentTextTheme.headline.backgroundColor,
ListTile(
contentPadding: EdgeInsets.only(left: 20.0),
title: Text(
settingsStore.itemHeaders[ItemHeaders.version],
style: TextStyle(
fontSize: 14.0, color: Palette.wildDarkBlue)
),
)
],
));

View file

@ -46,6 +46,8 @@ abstract class SettingsStoreBase with Store {
(dynamic _) => _sharedPreferences.setInt(displayActionListModeKey,
serializeActionlistDisplayModes(actionlistDisplayMode)),
fireImmediately: false);
currentVersion = _sharedPreferences.getInt('current_default_settings_migration_version');
}
static const currentNodeIdKey = 'current_node_id';
@ -143,6 +145,7 @@ abstract class SettingsStoreBase with Store {
SharedPreferences _sharedPreferences;
Box<Node> _nodes;
int currentVersion;
@action
Future setAllowBiometricalAuthentication(
@ -264,7 +267,8 @@ abstract class SettingsStoreBase with Store {
ItemHeaders.darkMode: S.current.settings_dark_mode,
ItemHeaders.support: S.current.settings_support,
ItemHeaders.termsAndConditions: S.current.settings_terms_and_conditions,
ItemHeaders.faq: S.current.faq
ItemHeaders.faq: S.current.faq,
ItemHeaders.version: 'Version 1.0.$currentVersion'
});
}