chore: Follow up push rule settings

pull/1595/head
Krille 9 months ago
parent 0106c0f6f6
commit 07fdfd1649
No known key found for this signature in database
GPG Key ID: E067ECD60F1A0652

@ -43,7 +43,8 @@ class SettingsNotificationsView extends StatelessWidget {
), ),
builder: (BuildContext context, _) { builder: (BuildContext context, _) {
final theme = Theme.of(context); final theme = Theme.of(context);
return Column( return SelectionArea(
child: Column(
children: [ children: [
if (pushRules != null) if (pushRules != null)
for (final category in pushCategories) ...[ for (final category in pushCategories) ...[
@ -57,7 +58,7 @@ class SettingsNotificationsView extends StatelessWidget {
), ),
), ),
for (final rule in category.rules) for (final rule in category.rules)
SwitchListTile.adaptive( ListTile(
title: Text(rule.getPushRuleName(L10n.of(context))), title: Text(rule.getPushRuleName(L10n.of(context))),
subtitle: Text.rich( subtitle: Text.rich(
TextSpan( TextSpan(
@ -88,6 +89,7 @@ class SettingsNotificationsView extends StatelessWidget {
], ],
), ),
), ),
trailing: Switch.adaptive(
value: rule.enabled, value: rule.enabled,
onChanged: controller.isLoading onChanged: controller.isLoading
? null ? null
@ -101,6 +103,7 @@ class SettingsNotificationsView extends StatelessWidget {
rule, rule,
), ),
), ),
),
Divider(color: theme.dividerColor), Divider(color: theme.dividerColor),
], ],
ListTile( ListTile(
@ -154,6 +157,7 @@ class SettingsNotificationsView extends StatelessWidget {
}, },
), ),
], ],
),
); );
}, },
), ),

Loading…
Cancel
Save