chore: Design follow up

This commit is contained in:
krille-chan 2023-12-26 18:19:33 +01:00
commit 038cd9cb73
No known key found for this signature in database
6 changed files with 172 additions and 139 deletions

View file

@ -45,26 +45,20 @@ class SettingsNotificationsView extends StatelessWidget {
),
),
),
if (!Matrix.of(context).client.allPushNotificationsMuted) ...{
const Divider(thickness: 1),
ListTile(
title: Text(
L10n.of(context)!.pushRules,
style: TextStyle(
color: Theme.of(context).colorScheme.secondary,
fontWeight: FontWeight.bold,
),
),
for (final item in NotificationSettingsItem.items)
SwitchListTile.adaptive(
value: Matrix.of(context).client.allPushNotificationsMuted
? false
: controller.getNotificationSetting(item) ?? true,
title: Text(item.title(context)),
onChanged: Matrix.of(context)
.client
.allPushNotificationsMuted
? null
: (bool enabled) =>
controller.setNotificationSetting(item, enabled),
),
for (final item in NotificationSettingsItem.items)
SwitchListTile.adaptive(
value: controller.getNotificationSetting(item) ?? true,
title: Text(item.title(context)),
onChanged: (bool enabled) =>
controller.setNotificationSetting(item, enabled),
),
},
const Divider(thickness: 1),
const Divider(),
ListTile(
title: Text(
L10n.of(context)!.devices,