mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-11-14 09:14:05 +01:00
CAKE-158 | made account tile slidable; added onEdit function to account tile; added ability to edit wallet account name; added isFirstAddress parameter to wallet_address_list_view_model.dart and made first address in the address list not editable (receive page); wrapped wallet account name in the wallet menu title by observer; added _moneroTransactionsChangeReaction to dashboard_view_model.dart
This commit is contained in:
@@ -116,6 +116,8 @@ class ReceivePage extends BasePage {
|
||||
}
|
||||
|
||||
if (item is WalletAddressListItem) {
|
||||
final isFirst = addressListViewModel.isFirstAddress;
|
||||
addressListViewModel.isFirstAddress = false;
|
||||
cell = Observer(builder: (_) {
|
||||
final isCurrent = item.address ==
|
||||
addressListViewModel.address.address;
|
||||
@@ -134,6 +136,7 @@ class ReceivePage extends BasePage {
|
||||
|
||||
return AddressCell.fromItem(item,
|
||||
isCurrent: isCurrent,
|
||||
isFirstAddress: isFirst,
|
||||
backgroundColor: backgroundColor,
|
||||
textColor: textColor,
|
||||
onTap: (_) => addressListViewModel.setAddress(item),
|
||||
|
||||
@@ -6,6 +6,7 @@ import 'package:cake_wallet/view_model/wallet_address_list/wallet_address_list_i
|
||||
class AddressCell extends StatelessWidget {
|
||||
factory AddressCell.fromItem(WalletAddressListItem item,
|
||||
{@required bool isCurrent,
|
||||
@required bool isFirstAddress,
|
||||
@required Color backgroundColor,
|
||||
@required Color textColor,
|
||||
Function(String) onTap,
|
||||
@@ -14,6 +15,7 @@ class AddressCell extends StatelessWidget {
|
||||
address: item.address,
|
||||
name: item.name,
|
||||
isCurrent: isCurrent,
|
||||
isFirstAddress: isFirstAddress,
|
||||
backgroundColor: backgroundColor,
|
||||
textColor: textColor,
|
||||
onTap: onTap,
|
||||
@@ -23,6 +25,7 @@ class AddressCell extends StatelessWidget {
|
||||
{@required this.address,
|
||||
@required this.name,
|
||||
@required this.isCurrent,
|
||||
@required this.isFirstAddress,
|
||||
@required this.backgroundColor,
|
||||
@required this.textColor,
|
||||
this.onTap,
|
||||
@@ -31,6 +34,7 @@ class AddressCell extends StatelessWidget {
|
||||
final String address;
|
||||
final String name;
|
||||
final bool isCurrent;
|
||||
final bool isFirstAddress;
|
||||
final Color backgroundColor;
|
||||
final Color textColor;
|
||||
final Function(String) onTap;
|
||||
@@ -56,7 +60,7 @@ class AddressCell extends StatelessWidget {
|
||||
),
|
||||
));
|
||||
|
||||
return isCurrent
|
||||
return (isCurrent || isFirstAddress)
|
||||
? cell
|
||||
: Slidable(
|
||||
key: Key(address),
|
||||
|
||||
Reference in New Issue
Block a user