desktop wallet transactions ui fix

This commit is contained in:
julian 2023-04-20 18:34:16 -06:00
parent 58bc67f9ea
commit e7eec36986
2 changed files with 38 additions and 15 deletions

View file

@ -852,6 +852,8 @@ class _DesktopTransactionCardRowState
prefix = "-"; prefix = "-";
} else if (_transaction.type == TransactionType.incoming) { } else if (_transaction.type == TransactionType.incoming) {
prefix = "+"; prefix = "+";
} else {
prefix = "";
} }
} else { } else {
prefix = ""; prefix = "";

View file

@ -7,6 +7,7 @@ import 'package:flutter_svg/svg.dart';
import 'package:stackwallet/pages/add_wallet_views/add_token_view/edit_wallet_tokens_view.dart'; import 'package:stackwallet/pages/add_wallet_views/add_token_view/edit_wallet_tokens_view.dart';
import 'package:stackwallet/pages/token_view/my_tokens_view.dart'; import 'package:stackwallet/pages/token_view/my_tokens_view.dart';
import 'package:stackwallet/pages/wallet_view/sub_widgets/transactions_list.dart'; import 'package:stackwallet/pages/wallet_view/sub_widgets/transactions_list.dart';
import 'package:stackwallet/pages/wallet_view/transaction_views/all_transactions_view.dart';
import 'package:stackwallet/pages_desktop_specific/my_stack_view/wallet_view/sub_widgets/desktop_wallet_features.dart'; import 'package:stackwallet/pages_desktop_specific/my_stack_view/wallet_view/sub_widgets/desktop_wallet_features.dart';
import 'package:stackwallet/pages_desktop_specific/my_stack_view/wallet_view/sub_widgets/desktop_wallet_summary.dart'; import 'package:stackwallet/pages_desktop_specific/my_stack_view/wallet_view/sub_widgets/desktop_wallet_summary.dart';
import 'package:stackwallet/pages_desktop_specific/my_stack_view/wallet_view/sub_widgets/my_wallet.dart'; import 'package:stackwallet/pages_desktop_specific/my_stack_view/wallet_view/sub_widgets/my_wallet.dart';
@ -285,7 +286,12 @@ class _DesktopWalletViewState extends ConsumerState<DesktopWalletView> {
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
Text( Text(
"Tokens", ref.watch(walletsChangeNotifierProvider.select(
(value) => value
.getManager(widget.walletId)
.hasTokenSupport))
? "Tokens"
: "Recent transactions",
style: STextStyles.desktopTextExtraSmall(context) style: STextStyles.desktopTextExtraSmall(context)
.copyWith( .copyWith(
color: Theme.of(context) color: Theme.of(context)
@ -294,21 +300,36 @@ class _DesktopWalletViewState extends ConsumerState<DesktopWalletView> {
), ),
), ),
CustomTextButton( CustomTextButton(
text: "Edit", text: ref.watch(walletsChangeNotifierProvider.select(
onTap: () async { (value) => value
final result = await showDialog<int?>( .getManager(widget.walletId)
context: context, .hasTokenSupport))
builder: (context) => EditWalletTokensView( ? "Edit"
walletId: widget.walletId, : "See all",
isDesktopPopup: true, onTap: ref.watch(walletsChangeNotifierProvider.select(
), (value) => value
); .getManager(widget.walletId)
.hasTokenSupport))
? () async {
final result = await showDialog<int?>(
context: context,
builder: (context) => EditWalletTokensView(
walletId: widget.walletId,
isDesktopPopup: true,
),
);
if (result == 42) { if (result == 42) {
// wallet tokens were edited so update ui // wallet tokens were edited so update ui
setState(() {}); setState(() {});
} }
}, }
: () {
Navigator.of(context).pushNamed(
AllTransactionsView.routeName,
arguments: widget.walletId,
);
},
), ),
], ],
), ),