MESSENGER-2762 Initial Merge

This commit is contained in:
Frank Rotermund
2022-03-17 15:51:23 +01:00
parent ecae8d618f
commit c2108a2178
384 changed files with 17708 additions and 1928 deletions
@@ -32,13 +32,24 @@ extension NotificationSettingsScreen: Identifiable {
extension NotificationSettingsScreen {
/// Defines which rules are handled by each of the screens.
var pushRules: [NotificationPushRuleId] {
switch self {
case .defaultNotifications:
return [.oneToOneRoom, .allOtherMessages, .oneToOneEncryptedRoom, .encrypted]
case .mentionsAndKeywords:
return [.containDisplayName, .containUserName, .roomNotif, .keywords]
case .other:
return [.inviteMe, .call, .suppressBots, .tombstone]
if BuildSettings.settingsNotificationsBWIDefaultSet {
switch self {
case .defaultNotifications:
return [.oneToOneEncryptedRoom, .encrypted, .inviteMe]
case .mentionsAndKeywords:
return []
case .other:
return []
}
} else {
switch self {
case .defaultNotifications:
return [.oneToOneRoom, .allOtherMessages, .oneToOneEncryptedRoom, .encrypted]
case .mentionsAndKeywords:
return [.containDisplayName, .containUserName, .roomNotif, .keywords]
case .other:
return [.inviteMe, .call, .suppressBots, .tombstone]
}
}
}
}