mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 16:10:20 +00:00
Add a feature flag for Simplified Sliding Sync. (#3057)
* Disable SSS when logging out. * Bump the SDK.
This commit is contained in:
@@ -86,7 +86,10 @@ class NotificationServiceExtension: UNNotificationServiceExtension {
|
||||
// It's imperative that we create **at most** one UserSession/Client per process
|
||||
Task.synchronous { [appHooks] in
|
||||
do {
|
||||
Self.userSession = try await NSEUserSession(credentials: credentials, clientSessionDelegate: keychainController, appHooks: appHooks)
|
||||
Self.userSession = try await NSEUserSession(credentials: credentials,
|
||||
clientSessionDelegate: keychainController,
|
||||
simplifiedSlidingSyncEnabled: settings.simplifiedSlidingSyncEnabled,
|
||||
appHooks: appHooks)
|
||||
} catch {
|
||||
MXLog.error("Failed creating user session with error: \(error)")
|
||||
}
|
||||
|
||||
@@ -18,6 +18,7 @@ import Foundation
|
||||
|
||||
protocol NSESettingsProtocol {
|
||||
var logLevel: TracingConfiguration.LogLevel { get }
|
||||
var simplifiedSlidingSyncEnabled: Bool { get }
|
||||
}
|
||||
|
||||
extension AppSettings: NSESettingsProtocol { }
|
||||
|
||||
@@ -25,7 +25,7 @@ final class NSEUserSession {
|
||||
imageCache: .onlyOnDisk)
|
||||
private let delegateHandle: TaskHandle?
|
||||
|
||||
init(credentials: KeychainCredentials, clientSessionDelegate: ClientSessionDelegate, appHooks: AppHooks) async throws {
|
||||
init(credentials: KeychainCredentials, clientSessionDelegate: ClientSessionDelegate, simplifiedSlidingSyncEnabled: Bool, appHooks: AppHooks) async throws {
|
||||
userID = credentials.userID
|
||||
if credentials.restorationToken.passphrase != nil {
|
||||
MXLog.info("Restoring client with encrypted store.")
|
||||
@@ -36,6 +36,7 @@ final class NSEUserSession {
|
||||
.baseBuilder(setupEncryption: false,
|
||||
httpProxy: URL(string: homeserverURL)?.globalProxy,
|
||||
sessionDelegate: clientSessionDelegate,
|
||||
simplifiedSlidingSyncEnabled: simplifiedSlidingSyncEnabled,
|
||||
appHooks: appHooks)
|
||||
.sessionPath(path: credentials.restorationToken.sessionDirectory.path(percentEncoded: false))
|
||||
.username(username: credentials.userID)
|
||||
|
||||
Reference in New Issue
Block a user