Notification Encryption Sync is defaulted to true (#1265)

* notification encryption sync is defaulted to true

* more documentation
This commit is contained in:
Mauro
2023-07-06 11:45:38 +02:00
committed by GitHub
parent b0aff0c051
commit 1de2a0b3e3
3 changed files with 5 additions and 3 deletions
@@ -186,7 +186,7 @@ final class AppSettings {
var pusherProfileTag: String? var pusherProfileTag: String?
/// Tag describing if the app and the NSE should use the encryption sync /// Tag describing if the app and the NSE should use the encryption sync
@UserPreference(key: SharedUserDefaultsKeys.isEncryptionSyncEnabled, defaultValue: false, storageType: .userDefaults(store)) @UserPreference(key: SharedUserDefaultsKeys.isEncryptionSyncEnabled, defaultValue: true, storageType: .userDefaults(store))
var isEncryptionSyncEnabled var isEncryptionSyncEnabled
// MARK: - Other // MARK: - Other
+3 -1
View File
@@ -77,10 +77,12 @@ extension UserPreference {
} }
/// Convenience initializer that also immediatelly stores the provided initialValue. /// Convenience initializer that also immediatelly stores the provided initialValue.
/// The initial value is stored every time the app is launched.
/// And will override any existing values.
/// ///
/// - Parameters: /// - Parameters:
/// - key: the raw representable key used to store the value, needs conform also to String /// - key: the raw representable key used to store the value, needs conform also to String
/// - initialValue: the initial value that will be stored, the initialValue is also used as defaultValue /// - initialValue: the initial value that will be stored when the app is launched, the initialValue is also used as defaultValue
/// - storageType: the storage type where the wrappedValue will be stored. /// - storageType: the storage type where the wrappedValue will be stored.
convenience init<R: RawRepresentable>(key: R, initialValue: T, storageType: StorageType) where R.RawValue == String { convenience init<R: RawRepresentable>(key: R, initialValue: T, storageType: StorageType) where R.RawValue == String {
self.init(key: key, defaultValue: initialValue, storageType: storageType) self.init(key: key, defaultValue: initialValue, storageType: storageType)
+1 -1
View File
@@ -23,6 +23,6 @@ final class NSESettings {
private static var store: UserDefaults! = UserDefaults(suiteName: suiteName) private static var store: UserDefaults! = UserDefaults(suiteName: suiteName)
/// Tag describing if the app and the NSE should use the encryption sync /// Tag describing if the app and the NSE should use the encryption sync
@UserPreference(key: SharedUserDefaultsKeys.isEncryptionSyncEnabled, defaultValue: false, storageType: .userDefaults(store)) @UserPreference(key: SharedUserDefaultsKeys.isEncryptionSyncEnabled, defaultValue: true, storageType: .userDefaults(store))
var isEncryptionSyncEnabled var isEncryptionSyncEnabled
} }