mirror of
https://github.com/krille-chan/fluffychat
synced 2024-09-17 06:55:12 +00:00
fix: Notification settings
This commit is contained in:
parent
b176811f7c
commit
39b830d0c1
1 changed files with 2 additions and 8 deletions
|
@ -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 a new issue