forked from Nexus/nexus
add a global toggle to hide membership events
This commit is contained in:
parent
80197aff00
commit
0ee2e99288
3 changed files with 28 additions and 0 deletions
|
|
@ -166,6 +166,21 @@ class SettingsSectionsController
|
|||
: null,
|
||||
),
|
||||
),
|
||||
.new(
|
||||
title: "Hide Membership Events",
|
||||
description: "Hides membership events (invites, joins, leaves, bans & knocks) from appearing in conversations.",
|
||||
icon: Icons.person_off,
|
||||
builder: (title, description, icon) => SwitchListTile(
|
||||
title: Text(title),
|
||||
subtitle: Text(description),
|
||||
secondary: Icon(icon),
|
||||
value: settings.hideMembershipEvents,
|
||||
onChanged: (value) => ref
|
||||
.read(SettingsController.provider.notifier)
|
||||
.set(settings.copyWith(hideMembershipEvents: value))
|
||||
.onError(showError),
|
||||
),
|
||||
),
|
||||
]),
|
||||
),
|
||||
]),
|
||||
|
|
|
|||
Loading…
Reference in a new issue