mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-10-23 06:38:35 +02:00
CWA-220 | changed menu widget; changed primary account to primary subaddress in subaddress list; applied short address if the label of a subaddress is empty; applied full address when long press on subaddress tile without label; applied biometrical authentication button when the authentication switch is on; changed dismissible icon in the node list page
This commit is contained in:
@@ -15,6 +15,7 @@ class SubaddressListStore = SubaddressListStoreBase with _$SubaddressListStore;
|
||||
abstract class SubaddressListStoreBase with Store {
|
||||
SubaddressListStoreBase({@required WalletService walletService}) {
|
||||
subaddresses = ObservableList<Subaddress>();
|
||||
isShortAddressShow = ObservableList<bool>();
|
||||
|
||||
if (walletService.currentWallet != null) {
|
||||
_onWalletChanged(walletService.currentWallet);
|
||||
@@ -27,12 +28,20 @@ abstract class SubaddressListStoreBase with Store {
|
||||
@observable
|
||||
ObservableList<Subaddress> subaddresses;
|
||||
|
||||
@observable
|
||||
ObservableList<bool> isShortAddressShow;
|
||||
|
||||
SubaddressList _subaddressList;
|
||||
StreamSubscription<Wallet> _onWalletChangeSubscription;
|
||||
StreamSubscription<List<Subaddress>> _onSubaddressesChangeSubscription;
|
||||
StreamSubscription<Account> _onAccountChangeSubscription;
|
||||
Account _account;
|
||||
|
||||
@action
|
||||
void setShortAddressShow(int index, bool isShow) {
|
||||
isShortAddressShow[index] = isShow;
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
if (_onSubaddressesChangeSubscription != null) {
|
||||
@@ -47,6 +56,10 @@ abstract class SubaddressListStoreBase with Store {
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
void updateShortAddressShow() {
|
||||
isShortAddressShow = ObservableList.of(List.generate(subaddresses.length, (i) => true));
|
||||
}
|
||||
|
||||
Future<void> _updateSubaddressList({int accountIndex}) async {
|
||||
await _subaddressList.refresh(accountIndex: accountIndex);
|
||||
subaddresses = ObservableList.of(_subaddressList.getAll());
|
||||
|
||||
Reference in New Issue
Block a user