mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2024-12-23 22:12:34 +01:00
fix: Notification settings
This commit is contained in:
parent
9bad93c2df
commit
0262d776d5
@ -58,14 +58,8 @@ class SettingsNotifications extends StatefulWidget {
|
||||
|
||||
class SettingsNotificationsController extends State<SettingsNotifications> {
|
||||
bool? getNotificationSetting(NotificationSettingsItem item) {
|
||||
// Until https://gitlab.com/famedly/company/frontend/famedlysdk/-/merge_requests/1124 is shipped
|
||||
final pushRulesRaw = Matrix.of(context)
|
||||
.client
|
||||
.accountData['m.push_rules']
|
||||
?.content
|
||||
.tryGetMap<String, dynamic>('device');
|
||||
if (pushRulesRaw == null) return null;
|
||||
final pushRules = PushRuleSet.fromJson(pushRulesRaw);
|
||||
final pushRules = Matrix.of(context).client.globalPushRules;
|
||||
if (pushRules == null) return null;
|
||||
switch (item.type) {
|
||||
case PushRuleKind.content:
|
||||
return pushRules.content
|
||||
|
Loading…
Reference in New Issue
Block a user