From 95fc43f4fcd83225794c90f41120134719d6b879 Mon Sep 17 00:00:00 2001 From: Stefan Ceriu Date: Tue, 13 Oct 2026 18:39:09 +0300 Subject: [PATCH] Bump the RustSDK to v26.10.13 --- .../Sources/Generated/SDKGeneratedMocks.swift | 60 +++++++++---------- ElementX.xcodeproj/project.pbxproj | 2 +- .../xcshareddata/swiftpm/Package.resolved | 4 +- ElementX/Sources/Mocks/ClientProxyMock.swift | 2 +- .../DeveloperOptionsScreenViewModel.swift | 3 + .../Services/Client/ClientFactory.swift | 4 +- project.yml | 2 +- 7 files changed, 40 insertions(+), 37 deletions(-) diff --git a/Components/SDKMocks/Sources/Generated/SDKGeneratedMocks.swift b/Components/SDKMocks/Sources/Generated/SDKGeneratedMocks.swift index 47efa11af..5cedc4b28 100644 --- a/Components/SDKMocks/Sources/Generated/SDKGeneratedMocks.swift +++ b/Components/SDKMocks/Sources/Generated/SDKGeneratedMocks.swift @@ -5940,44 +5940,44 @@ open class ClientBuilderSDKMock: MatrixRustSDK.ClientBuilder, @unchecked Sendabl //MARK: - withSearchIndexStore - private let withSearchIndexStorePathPasswordCallsCountLock = NSLock() - private var withSearchIndexStorePathPasswordUnderlyingCallsCount = 0 - open var withSearchIndexStorePathPasswordCallsCount: Int { - get { withSearchIndexStorePathPasswordCallsCountLock.withLock { withSearchIndexStorePathPasswordUnderlyingCallsCount } } - set { withSearchIndexStorePathPasswordCallsCountLock.withLock { withSearchIndexStorePathPasswordUnderlyingCallsCount = newValue } } + private let withSearchIndexStorePathKeyCallsCountLock = NSLock() + private var withSearchIndexStorePathKeyUnderlyingCallsCount = 0 + open var withSearchIndexStorePathKeyCallsCount: Int { + get { withSearchIndexStorePathKeyCallsCountLock.withLock { withSearchIndexStorePathKeyUnderlyingCallsCount } } + set { withSearchIndexStorePathKeyCallsCountLock.withLock { withSearchIndexStorePathKeyUnderlyingCallsCount = newValue } } } - open var withSearchIndexStorePathPasswordCalled: Bool { - return withSearchIndexStorePathPasswordCallsCount > 0 + open var withSearchIndexStorePathKeyCalled: Bool { + return withSearchIndexStorePathKeyCallsCount > 0 } - private let withSearchIndexStorePathPasswordReceivedArgumentsLock = NSLock() - private var withSearchIndexStorePathPasswordUnderlyingReceivedArguments: (path: String, password: String?)? - open var withSearchIndexStorePathPasswordReceivedArguments: (path: String, password: String?)? { - get { withSearchIndexStorePathPasswordReceivedArgumentsLock.withLock { withSearchIndexStorePathPasswordUnderlyingReceivedArguments } } - set { withSearchIndexStorePathPasswordReceivedArgumentsLock.withLock { withSearchIndexStorePathPasswordUnderlyingReceivedArguments = newValue } } + private let withSearchIndexStorePathKeyReceivedArgumentsLock = NSLock() + private var withSearchIndexStorePathKeyUnderlyingReceivedArguments: (path: String, key: String?)? + open var withSearchIndexStorePathKeyReceivedArguments: (path: String, key: String?)? { + get { withSearchIndexStorePathKeyReceivedArgumentsLock.withLock { withSearchIndexStorePathKeyUnderlyingReceivedArguments } } + set { withSearchIndexStorePathKeyReceivedArgumentsLock.withLock { withSearchIndexStorePathKeyUnderlyingReceivedArguments = newValue } } } - private let withSearchIndexStorePathPasswordReceivedInvocationsLock = NSLock() - private var withSearchIndexStorePathPasswordUnderlyingReceivedInvocations: [(path: String, password: String?)] = [] - open var withSearchIndexStorePathPasswordReceivedInvocations: [(path: String, password: String?)] { - get { withSearchIndexStorePathPasswordReceivedInvocationsLock.withLock { withSearchIndexStorePathPasswordUnderlyingReceivedInvocations } } - set { withSearchIndexStorePathPasswordReceivedInvocationsLock.withLock { withSearchIndexStorePathPasswordUnderlyingReceivedInvocations = newValue } } + private let withSearchIndexStorePathKeyReceivedInvocationsLock = NSLock() + private var withSearchIndexStorePathKeyUnderlyingReceivedInvocations: [(path: String, key: String?)] = [] + open var withSearchIndexStorePathKeyReceivedInvocations: [(path: String, key: String?)] { + get { withSearchIndexStorePathKeyReceivedInvocationsLock.withLock { withSearchIndexStorePathKeyUnderlyingReceivedInvocations } } + set { withSearchIndexStorePathKeyReceivedInvocationsLock.withLock { withSearchIndexStorePathKeyUnderlyingReceivedInvocations = newValue } } } - private let withSearchIndexStorePathPasswordReturnValueLock = NSLock() - open var withSearchIndexStorePathPasswordUnderlyingReturnValue: ClientBuilder! - open var withSearchIndexStorePathPasswordReturnValue: ClientBuilder! { - get { withSearchIndexStorePathPasswordReturnValueLock.withLock { withSearchIndexStorePathPasswordUnderlyingReturnValue } } - set { withSearchIndexStorePathPasswordReturnValueLock.withLock { withSearchIndexStorePathPasswordUnderlyingReturnValue = newValue } } + private let withSearchIndexStorePathKeyReturnValueLock = NSLock() + open var withSearchIndexStorePathKeyUnderlyingReturnValue: ClientBuilder! + open var withSearchIndexStorePathKeyReturnValue: ClientBuilder! { + get { withSearchIndexStorePathKeyReturnValueLock.withLock { withSearchIndexStorePathKeyUnderlyingReturnValue } } + set { withSearchIndexStorePathKeyReturnValueLock.withLock { withSearchIndexStorePathKeyUnderlyingReturnValue = newValue } } } - open var withSearchIndexStorePathPasswordClosure: ((String, String?) -> ClientBuilder)? + open var withSearchIndexStorePathKeyClosure: ((String, String?) -> ClientBuilder)? - open override func withSearchIndexStore(path: String, password: String?) -> ClientBuilder { - withSearchIndexStorePathPasswordCallsCountLock.withLock { withSearchIndexStorePathPasswordUnderlyingCallsCount += 1 } - withSearchIndexStorePathPasswordReceivedArguments = (path: path, password: password) - withSearchIndexStorePathPasswordReceivedInvocationsLock.withLock { withSearchIndexStorePathPasswordUnderlyingReceivedInvocations.append((path: path, password: password)) } - if let withSearchIndexStorePathPasswordClosure = withSearchIndexStorePathPasswordClosure { - return withSearchIndexStorePathPasswordClosure(path, password) + open override func withSearchIndexStore(path: String, key: String?) -> ClientBuilder { + withSearchIndexStorePathKeyCallsCountLock.withLock { withSearchIndexStorePathKeyUnderlyingCallsCount += 1 } + withSearchIndexStorePathKeyReceivedArguments = (path: path, key: key) + withSearchIndexStorePathKeyReceivedInvocationsLock.withLock { withSearchIndexStorePathKeyUnderlyingReceivedInvocations.append((path: path, key: key)) } + if let withSearchIndexStorePathKeyClosure = withSearchIndexStorePathKeyClosure { + return withSearchIndexStorePathKeyClosure(path, key) } else { - return withSearchIndexStorePathPasswordReturnValue + return withSearchIndexStorePathKeyReturnValue } } } diff --git a/ElementX.xcodeproj/project.pbxproj b/ElementX.xcodeproj/project.pbxproj index 351298767..166e5914c 100644 --- a/ElementX.xcodeproj/project.pbxproj +++ b/ElementX.xcodeproj/project.pbxproj @@ -11087,7 +11087,7 @@ repositoryURL = "https://github.com/element-hq/matrix-rust-components-swift"; requirement = { kind = exactVersion; - version = 26.10.12; + version = 26.10.13; }; }; 701C7BEF8F70F7A83E852DCC /* XCRemoteSwiftPackageReference "GZIP" */ = { diff --git a/ElementX.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/ElementX.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index ae271622b..69a2c45ca 100644 --- a/ElementX.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/ElementX.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -176,8 +176,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/element-hq/matrix-rust-components-swift", "state" : { - "revision" : "3e1afbc22e167073a54ca69a2fcf853bbdd06b79", - "version" : "26.10.12" + "revision" : "930385a6bc54c8663767f504d7a63202f541a6d3", + "version" : "26.10.13" } }, { diff --git a/ElementX/Sources/Mocks/ClientProxyMock.swift b/ElementX/Sources/Mocks/ClientProxyMock.swift index dd5e20f0b..97442eb2c 100644 --- a/ElementX/Sources/Mocks/ClientProxyMock.swift +++ b/ElementX/Sources/Mocks/ClientProxyMock.swift @@ -179,7 +179,7 @@ extension ClientProxyMock { underlyingMaxMediaUploadSize = .success(configuration.maxMediaUploadSize) - storeSizesReturnValue = .success(.init(cryptoStore: 1, stateStore: 9, eventCacheStore: 8, mediaStore: 6)) + storeSizesReturnValue = .success(.init(cryptoStore: 1, stateStore: 9, eventCacheStore: 8, mediaStore: 6, searchIndex: 5)) configurePresenceSendImmediatelyReturnValue = .success(()) } diff --git a/ElementX/Sources/Screens/Settings/DeveloperOptionsScreen/DeveloperOptionsScreenViewModel.swift b/ElementX/Sources/Screens/Settings/DeveloperOptionsScreen/DeveloperOptionsScreenViewModel.swift index cacba6807..31a63dda5 100644 --- a/ElementX/Sources/Screens/Settings/DeveloperOptionsScreen/DeveloperOptionsScreenViewModel.swift +++ b/ElementX/Sources/Screens/Settings/DeveloperOptionsScreen/DeveloperOptionsScreenViewModel.swift @@ -51,6 +51,9 @@ class DeveloperOptionsScreenViewModel: DeveloperOptionsScreenViewModelType, Deve if let mediaStore = sizes.mediaStore { components.append(.init(name: "MediaStore", size: formatter.format(Int64(mediaStore)))) } + if let searchIndex = sizes.searchIndex { + components.append(.init(name: "SearchIndex", size: formatter.format(Int64(searchIndex)))) + } if let logsSize = try? FileManager.default.sizeForDirectory(at: .appGroupLogsDirectory) { components.append(.init(name: "Log Files", size: formatter.format(Int64(logsSize)))) } diff --git a/ElementX/Sources/Services/Client/ClientFactory.swift b/ElementX/Sources/Services/Client/ClientFactory.swift index 5743398fe..14e283647 100644 --- a/ElementX/Sources/Services/Client/ClientFactory.swift +++ b/ElementX/Sources/Services/Client/ClientFactory.swift @@ -30,7 +30,7 @@ nonisolated struct ClientFactory: ClientFactoryProtocol { .sqliteStore(config: .init(dataPath: sessionDirectories.dataPath, cachePath: sessionDirectories.cachePath) .highEntropyPassphrase(passphrase: passphrase, base64Variant: .padded)) .withSearchIndexStore(path: sessionDirectories.dataPath, - password: passphrase.base64EncodedString()) + key: passphrase.base64EncodedString()) .serverNameOrHomeserverUrl(serverNameOrUrl: serverNameOrBaseURL) return try await build(builder, for: .authentication, appHooks: appHooks) @@ -71,7 +71,7 @@ nonisolated struct ClientFactory: ClientFactoryProtocol { cachePath: credentials.restorationToken.sessionDirectories.cachePath) .highEntropyPassphrase(passphrase: credentials.restorationToken.passphrase, base64Variant: .padded)) .withSearchIndexStore(path: credentials.restorationToken.sessionDirectories.dataPath, - password: credentials.restorationToken.passphrase.base64EncodedString()) + key: credentials.restorationToken.passphrase.base64EncodedString()) .homeserverUrl(url: homeserverURL) return try await build(builder, for: .restoration(credentials.restorationToken.session, .all), appHooks: appHooks) diff --git a/project.yml b/project.yml index f5d6ebe7f..cb66b9353 100644 --- a/project.yml +++ b/project.yml @@ -75,7 +75,7 @@ packages: # Element/Matrix dependencies MatrixRustSDK: url: https://github.com/element-hq/matrix-rust-components-swift - exactVersion: 26.10.12 + exactVersion: 26.10.13 # path: ../matrix-rust-sdk Compound: path: compound-ios