Fix list UI having double width on some parts (#1687)
Some checks failed
Cache Dependencies / test (push) Has been cancelled

* save

* fix

* re-add support button

* update
This commit is contained in:
Matthew Fosse 2024-09-18 09:22:36 -07:00 committed by GitHub
parent c6a4c69084
commit b6bc3df622
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -97,7 +97,15 @@ class MenuWidgetState extends State<MenuWidget> {
@override @override
Widget build(BuildContext context) { 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', moneroIcon = Image.asset('assets/images/monero_menu.png',
color: Theme.of(context).extension<CakeMenuTheme>()!.iconColor); color: Theme.of(context).extension<CakeMenuTheme>()!.iconColor);
@ -181,12 +189,7 @@ class MenuWidgetState extends State<MenuWidget> {
index--; index--;
final item = SettingActions.all[index]; final item = items[index];
if (!widget.dashboardViewModel.hasSilentPayments &&
item.name(context) == S.of(context).silent_payments_settings) {
return Container();
}
final isLastTile = index == itemCount - 1; final isLastTile = index == itemCount - 1;