Cleanup code

This commit is contained in:
Alfonso Grillo
2022-12-02 12:31:26 +01:00
parent f307d43110
commit d01d9546c0
3 changed files with 19 additions and 17 deletions

View File

@@ -59,8 +59,7 @@ class MXNotificationSettingsService: NotificationSettingsServiceType {
func add(keyword: String, enabled: Bool) {
let index = NotificationIndex.index(when: enabled)
guard let actions = NotificationPushRuleId.keywords.standardActions(for: index)?.actions
else {
guard let actions = NotificationPushRuleId.keywords.standardActions(for: index).actions else {
return
}
session.notificationCenter.addContentRuleWithRuleId(matchingPattern: keyword, notify: actions.notify, sound: actions.sound, highlight: actions.highlight)