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;