feat: Inspect and delete push rules

This commit is contained in:
Krille 2025-02-05 09:38:15 +01:00
commit d7f7751e5e
No known key found for this signature in database
GPG key ID: E067ECD60F1A0652
3 changed files with 142 additions and 4 deletions

View file

@ -58,10 +58,37 @@ class SettingsNotificationsView extends StatelessWidget {
),
for (final rule in category.rules)
SwitchListTile.adaptive(
value: rule.enabled,
title: Text(rule.getPushRuleName(L10n.of(context))),
subtitle:
Text(rule.getPushRuleDescription(L10n.of(context))),
subtitle: Text.rich(
TextSpan(
children: [
TextSpan(
text: rule.getPushRuleDescription(
L10n.of(context),
),
),
const TextSpan(text: ' '),
WidgetSpan(
child: InkWell(
onTap: () => controller.editPushRule(
rule,
category.kind,
),
child: Text(
L10n.of(context).more,
style: TextStyle(
color: theme.colorScheme.primary,
decoration: TextDecoration.underline,
decorationColor:
theme.colorScheme.primary,
),
),
),
),
],
),
),
value: rule.enabled,
onChanged: controller.isLoading
? null
: Matrix.of(context)