two sync loop always enabled by default

This commit is contained in:
Mauro Romito
2023-07-25 18:00:10 +02:00
committed by Mauro
parent 7a9edc5efa
commit ed28bc5d02
8 changed files with 5 additions and 19 deletions
@@ -71,7 +71,7 @@ class NotificationServiceExtension: UNNotificationServiceExtension {
MXLog.info("\(tag) run with roomId: \(roomId), eventId: \(eventId)")
do {
let userSession = try NSEUserSession(credentials: credentials, isEncryptionSyncEnabled: settings.isEncryptionSyncEnabled)
let userSession = try NSEUserSession(credentials: credentials)
self.userSession = userSession
guard let itemProxy = await userSession.notificationItemProxy(roomID: roomId, eventID: eventId) else {
MXLog.info("\(tag) no notification for the event, discard")
-4
View File
@@ -21,8 +21,4 @@ final class NSESettings {
/// UserDefaults to be used on reads and writes.
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: true, storageType: .userDefaults(store))
var isEncryptionSyncEnabled
}
+2 -2
View File
@@ -25,7 +25,7 @@ final class NSEUserSession {
imageCache: .onlyOnDisk,
backgroundTaskService: nil)
init(credentials: KeychainCredentials, isEncryptionSyncEnabled: Bool) throws {
init(credentials: KeychainCredentials) throws {
userID = credentials.userID
baseClient = try ClientBuilder()
.basePath(path: URL.sessionsBaseDirectory.path)
@@ -36,7 +36,7 @@ final class NSEUserSession {
notificationClient = baseClient
.notificationClient()
.retryDecryption(withCrossProcessLock: isEncryptionSyncEnabled)
.retryDecryption(withCrossProcessLock: true)
.finish()
}