mirror of
https://github.com/vector-im/element-ios.git
synced 2024-09-29 07:42:40 +00:00
Add updatePushActions(for:enabled:standardActions) method
This commit is contained in:
parent
eae9b2fcc3
commit
96e01efaf7
1 changed files with 7 additions and 1 deletions
|
@ -114,8 +114,14 @@ final class NotificationSettingsViewModel: NotificationSettingsViewModelType, Ob
|
|||
case .keywords: // Keywords is handled differently to other settings
|
||||
updateKeywords(isChecked: isChecked)
|
||||
default:
|
||||
updatePushActions(for: [ruleID], enabled: enabled, standardActions: standardActions)
|
||||
}
|
||||
}
|
||||
|
||||
private func updatePushActions(for ids: [NotificationPushRuleId], enabled: Bool, standardActions: NotificationStandardActions) {
|
||||
for id in ids {
|
||||
notificationSettingsService.updatePushRuleActions(
|
||||
for: ruleID.rawValue,
|
||||
for: id.rawValue,
|
||||
enabled: enabled,
|
||||
actions: standardActions.actions
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue