Skip to content

Commit

Permalink
Fix list UI having double width on some parts (#1687)
Browse files Browse the repository at this point in the history
* save

* fix

* re-add support button

* update
  • Loading branch information
fossephate authored Sep 18, 2024
1 parent c6a4c69 commit b6bc3df
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions lib/src/screens/dashboard/widgets/menu_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,15 @@ class MenuWidgetState extends State<MenuWidget> {

@override
Widget build(BuildContext context) {
final itemCount = SettingActions.all.length;
List<SettingActions> 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<CakeMenuTheme>()!.iconColor);
Expand Down Expand Up @@ -181,12 +189,7 @@ class MenuWidgetState extends State<MenuWidget> {

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;

Expand Down

0 comments on commit b6bc3df

Please sign in to comment.