From 80b938c0be2da163e66637139473b48431b85aa1 Mon Sep 17 00:00:00 2001 From: Henry-Hiles Date: Wed, 22 Jul 2026 15:37:50 -0400 Subject: [PATCH] fix wrong settings categories opening when multiple sections exist --- lib/pages/settings.dart | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/lib/pages/settings.dart b/lib/pages/settings.dart index 96b9b82..fa4d8da 100644 --- a/lib/pages/settings.dart +++ b/lib/pages/settings.dart @@ -127,13 +127,13 @@ class SettingsPage extends ConsumerWidget { ), ...sections .mapTo( - (categoryGroup, categories) => [ + (section, categories) => [ SliverToBoxAdapter( child: Padding( padding: EdgeInsets.symmetric( horizontal: 16, ).copyWith(bottom: 4), - child: DividerText(categoryGroup), + child: DividerText(section), ), ), SliverM3ECardList( @@ -150,7 +150,14 @@ class SettingsPage extends ConsumerWidget { Navigator.of(context).push( MaterialPageRoute( builder: (context) => - SettingsCategoryPage(index), + SettingsCategoryPage( + sections + .values + .flattenedToList + .indexOf( + categories[index], + ), + ), ), ), itemBuilder: (context, index) => ListTile(