mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-06 12:28:29 +00:00
two sync loop always enabled by default
This commit is contained in:
@@ -11,7 +11,7 @@
|
|||||||
{
|
{
|
||||||
"identity" : "compound-ios",
|
"identity" : "compound-ios",
|
||||||
"kind" : "remoteSourceControl",
|
"kind" : "remoteSourceControl",
|
||||||
"location" : "https://github.com/vector-im/compound-ios",
|
"location" : "https://github.com/vector-im/compound-ios.git",
|
||||||
"state" : {
|
"state" : {
|
||||||
"revision" : "d9e119fbef20857eb790dd4aafbe16ff46011eca"
|
"revision" : "d9e119fbef20857eb790dd4aafbe16ff46011eca"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -187,10 +187,6 @@ final class AppSettings {
|
|||||||
/// Tag describing which set of device specific rules a pusher executes.
|
/// Tag describing which set of device specific rules a pusher executes.
|
||||||
@UserPreference(key: UserDefaultsKeys.pusherProfileTag, storageType: .userDefaults(store))
|
@UserPreference(key: UserDefaultsKeys.pusherProfileTag, storageType: .userDefaults(store))
|
||||||
var pusherProfileTag: String?
|
var pusherProfileTag: String?
|
||||||
|
|
||||||
/// Tag describing if the app and the NSE should use the encryption sync
|
|
||||||
@UserPreference(key: SharedUserDefaultsKeys.isEncryptionSyncEnabled, defaultValue: true, storageType: .userDefaults(store))
|
|
||||||
var isEncryptionSyncEnabled
|
|
||||||
|
|
||||||
// MARK: - Other
|
// MARK: - Other
|
||||||
|
|
||||||
|
|||||||
-1
@@ -46,7 +46,6 @@ protocol DeveloperOptionsProtocol: AnyObject {
|
|||||||
var shouldCollapseRoomStateEvents: Bool { get set }
|
var shouldCollapseRoomStateEvents: Bool { get set }
|
||||||
var userSuggestionsEnabled: Bool { get set }
|
var userSuggestionsEnabled: Bool { get set }
|
||||||
var readReceiptsEnabled: Bool { get set }
|
var readReceiptsEnabled: Bool { get set }
|
||||||
var isEncryptionSyncEnabled: Bool { get set }
|
|
||||||
var notificationSettingsEnabled: Bool { get set }
|
var notificationSettingsEnabled: Bool { get set }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
-5
@@ -34,11 +34,6 @@ struct DeveloperOptionsScreen: View {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Section("Notifications") {
|
Section("Notifications") {
|
||||||
Toggle(isOn: $context.isEncryptionSyncEnabled) {
|
|
||||||
Text("Use notification encryption sync")
|
|
||||||
Text("Requires app reboot")
|
|
||||||
}
|
|
||||||
|
|
||||||
Toggle(isOn: $context.notificationSettingsEnabled) {
|
Toggle(isOn: $context.notificationSettingsEnabled) {
|
||||||
Text("Show notification settings")
|
Text("Show notification settings")
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -406,7 +406,7 @@ class ClientProxy: ClientProxyProtocol {
|
|||||||
do {
|
do {
|
||||||
let syncService = try await client
|
let syncService = try await client
|
||||||
.syncService()
|
.syncService()
|
||||||
.withEncryptionSync(withCrossProcessLock: appSettings.isEncryptionSyncEnabled,
|
.withEncryptionSync(withCrossProcessLock: true,
|
||||||
appIdentifier: "MainApp")
|
appIdentifier: "MainApp")
|
||||||
.finish()
|
.finish()
|
||||||
let roomListService = syncService.roomListService()
|
let roomListService = syncService.roomListService()
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ class NotificationServiceExtension: UNNotificationServiceExtension {
|
|||||||
MXLog.info("\(tag) run with roomId: \(roomId), eventId: \(eventId)")
|
MXLog.info("\(tag) run with roomId: \(roomId), eventId: \(eventId)")
|
||||||
|
|
||||||
do {
|
do {
|
||||||
let userSession = try NSEUserSession(credentials: credentials, isEncryptionSyncEnabled: settings.isEncryptionSyncEnabled)
|
let userSession = try NSEUserSession(credentials: credentials)
|
||||||
self.userSession = userSession
|
self.userSession = userSession
|
||||||
guard let itemProxy = await userSession.notificationItemProxy(roomID: roomId, eventID: eventId) else {
|
guard let itemProxy = await userSession.notificationItemProxy(roomID: roomId, eventID: eventId) else {
|
||||||
MXLog.info("\(tag) no notification for the event, discard")
|
MXLog.info("\(tag) no notification for the event, discard")
|
||||||
|
|||||||
@@ -21,8 +21,4 @@ final class NSESettings {
|
|||||||
|
|
||||||
/// UserDefaults to be used on reads and writes.
|
/// UserDefaults to be used on reads and writes.
|
||||||
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
|
|
||||||
@UserPreference(key: SharedUserDefaultsKeys.isEncryptionSyncEnabled, defaultValue: true, storageType: .userDefaults(store))
|
|
||||||
var isEncryptionSyncEnabled
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ final class NSEUserSession {
|
|||||||
imageCache: .onlyOnDisk,
|
imageCache: .onlyOnDisk,
|
||||||
backgroundTaskService: nil)
|
backgroundTaskService: nil)
|
||||||
|
|
||||||
init(credentials: KeychainCredentials, isEncryptionSyncEnabled: Bool) throws {
|
init(credentials: KeychainCredentials) throws {
|
||||||
userID = credentials.userID
|
userID = credentials.userID
|
||||||
baseClient = try ClientBuilder()
|
baseClient = try ClientBuilder()
|
||||||
.basePath(path: URL.sessionsBaseDirectory.path)
|
.basePath(path: URL.sessionsBaseDirectory.path)
|
||||||
@@ -36,7 +36,7 @@ final class NSEUserSession {
|
|||||||
|
|
||||||
notificationClient = baseClient
|
notificationClient = baseClient
|
||||||
.notificationClient()
|
.notificationClient()
|
||||||
.retryDecryption(withCrossProcessLock: isEncryptionSyncEnabled)
|
.retryDecryption(withCrossProcessLock: true)
|
||||||
.finish()
|
.finish()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user