mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 16:10:20 +00:00
FF to enable filtering notifications by push rules (#1412)
* filtering notification by push rules * changelog * Apply suggestions from code review Co-authored-by: Doug <6060466+pixlwave@users.noreply.github.com> --------- Co-authored-by: Doug <6060466+pixlwave@users.noreply.github.com>
This commit is contained in:
@@ -189,6 +189,10 @@ final class AppSettings {
|
||||
/// Tag describing which set of device specific rules a pusher executes.
|
||||
@UserPreference(key: UserDefaultsKeys.pusherProfileTag, storageType: .userDefaults(store))
|
||||
var pusherProfileTag: String?
|
||||
|
||||
/// Allows notifications to be filtered based on the push context of the room
|
||||
@UserPreference(key: SharedUserDefaultsKeys.filterNotificationsByPushRulesEnabled, defaultValue: false, storageType: .userDefaults(store))
|
||||
var filterNotificationsByPushRulesEnabled
|
||||
|
||||
// MARK: - Other
|
||||
|
||||
|
||||
@@ -15,5 +15,5 @@
|
||||
//
|
||||
|
||||
enum SharedUserDefaultsKeys: String {
|
||||
case isEncryptionSyncEnabled
|
||||
case filterNotificationsByPushRulesEnabled
|
||||
}
|
||||
|
||||
+1
@@ -49,6 +49,7 @@ protocol DeveloperOptionsProtocol: AnyObject {
|
||||
var notificationSettingsEnabled: Bool { get set }
|
||||
var swiftUITimelineEnabled: Bool { get set }
|
||||
var pollsInTimelineEnabled: Bool { get set }
|
||||
var filterNotificationsByPushRulesEnabled: Bool { get set }
|
||||
}
|
||||
|
||||
extension AppSettings: DeveloperOptionsProtocol { }
|
||||
|
||||
+4
@@ -42,6 +42,10 @@ struct DeveloperOptionsScreen: View {
|
||||
Toggle(isOn: $context.notificationSettingsEnabled) {
|
||||
Text("Show notification settings")
|
||||
}
|
||||
|
||||
Toggle(isOn: $context.filterNotificationsByPushRulesEnabled) {
|
||||
Text("Filter notifications by push rules")
|
||||
}
|
||||
}
|
||||
|
||||
Section("Room creation") {
|
||||
|
||||
Reference in New Issue
Block a user