mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-05-03 22:56:57 +02:00
Add calls to update polls rules
This commit is contained in:
+4
-1
@@ -71,7 +71,10 @@ class MXNotificationSettingsService: NotificationSettingsServiceType {
|
||||
}
|
||||
|
||||
func updatePushRuleActions(for ruleId: String, enabled: Bool, actions: NotificationActions?) {
|
||||
guard let rule = session.notificationCenter.rule(byId: ruleId) else { return }
|
||||
guard let rule = session.notificationCenter.rule(byId: ruleId) else {
|
||||
return
|
||||
}
|
||||
|
||||
session.notificationCenter.enableRule(rule, isEnabled: enabled)
|
||||
|
||||
if let actions = actions {
|
||||
|
||||
+4
@@ -113,6 +113,10 @@ final class NotificationSettingsViewModel: NotificationSettingsViewModelType, Ob
|
||||
switch ruleID {
|
||||
case .keywords: // Keywords is handled differently to other settings
|
||||
updateKeywords(isChecked: isChecked)
|
||||
case .oneToOneRoom:
|
||||
updatePushActions(for: [ruleID, .msc3930oneToOnePollStart, .msc3930oneToOnePollEnd], enabled: enabled, standardActions: standardActions)
|
||||
case .allOtherMessages:
|
||||
updatePushActions(for: [ruleID, .msc3930pollStart, .msc3930pollEnd], enabled: enabled, standardActions: standardActions)
|
||||
default:
|
||||
updatePushActions(for: [ruleID], enabled: enabled, standardActions: standardActions)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user