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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 3 deletions

View File

@ -186,7 +186,7 @@ final class AppSettings {
var pusherProfileTag: String?
/// 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
// MARK: - Other

View File

@ -77,10 +77,12 @@ extension UserPreference {
}
/// 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:
/// - 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.
convenience init<R: RawRepresentable>(key: R, initialValue: T, storageType: StorageType) where R.RawValue == String {
self.init(key: key, defaultValue: initialValue, storageType: storageType)

View File

@ -23,6 +23,6 @@ final class NSESettings {
private static var store: UserDefaults! = UserDefaults(suiteName: suiteName)
/// 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
}