fix discrepancies with web

This commit is contained in:
David Langley 2021-07-15 16:06:46 +01:00
parent c08bd664ab
commit dff8503493
1 changed files with 3 additions and 2 deletions

View File

@ -130,10 +130,11 @@ class PushRulePreference : VectorPreference {
}
} else {
if (NOTIFICATION_OFF_INDEX == index) {
if (safeKind == RuleSetKey.UNDERRIDE || safeRule.ruleId == RuleIds.RULE_ID_SUPPRESS_BOTS_NOTIFICATIONS) {
if (safeKind == RuleSetKey.UNDERRIDE && safeRule.ruleId != RuleIds.RULE_ID_CALL) {
safeRule.setNotify(false)
} else {
safeRule.copy(enabled = false)
.removeNotificationSound()
}
} else {
val newRule = safeRule.copy(enabled = true)
@ -142,7 +143,7 @@ class PushRulePreference : VectorPreference {
&& safeRule.ruleId != RuleIds.RULE_ID_INVITE_ME
&& NOTIFICATION_NOISY_INDEX == index)
if (NOTIFICATION_NOISY_INDEX == index) {
if (NOTIFICATION_NOISY_INDEX == index && RuleIds.RULE_ID_ROOM_NOTIF != safeRule.ruleId) {
newRule.setNotificationSound(
if (safeRule.ruleId == RuleIds.RULE_ID_CALL) {
Action.ACTION_OBJECT_VALUE_VALUE_RING