From b6bc3df62276b046104842617cc497259aa15061 Mon Sep 17 00:00:00 2001 From: Matthew Fosse Date: Wed, 18 Sep 2024 09:22:36 -0700 Subject: [PATCH] Fix list UI having double width on some parts (#1687) * save * fix * re-add support button * update --- .../screens/dashboard/widgets/menu_widget.dart | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/lib/src/screens/dashboard/widgets/menu_widget.dart b/lib/src/screens/dashboard/widgets/menu_widget.dart index 78d8abc95..1caeb4c51 100644 --- a/lib/src/screens/dashboard/widgets/menu_widget.dart +++ b/lib/src/screens/dashboard/widgets/menu_widget.dart @@ -97,7 +97,15 @@ class MenuWidgetState extends State { @override Widget build(BuildContext context) { - final itemCount = SettingActions.all.length; + List items = SettingActions.all; + if (!widget.dashboardViewModel.hasSilentPayments) { + items.removeWhere((element) => element.name(context) == S.of(context).silent_payments_settings); + } + // if (!widget.dashboardViewModel.hasMweb) { + // itemCount--; + // items.removeWhere((element) => element.name(context) == S.of(context).litecoin_mweb_settings); + // } + int itemCount = items.length; moneroIcon = Image.asset('assets/images/monero_menu.png', color: Theme.of(context).extension()!.iconColor); @@ -181,12 +189,7 @@ class MenuWidgetState extends State { index--; - final item = SettingActions.all[index]; - - if (!widget.dashboardViewModel.hasSilentPayments && - item.name(context) == S.of(context).silent_payments_settings) { - return Container(); - } + final item = items[index]; final isLastTile = index == itemCount - 1;