mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 16:10:20 +00:00
two sync loop always enabled by default
This commit is contained in:
@@ -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")
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user