From bdc136ba8c1656137d0715601c64737e36a01557 Mon Sep 17 00:00:00 2001 From: Mauro <34335419+Velin92@users.noreply.github.com> Date: Tue, 7 Oct 2025 14:57:34 +0200 Subject: [PATCH] Update sdk to 25.10.07-2 (#4586) * update sdk to 25.10.07 * update generated mocks for the SDK * update the sdk to build number 2 * fixing compile errors --- ElementX.xcodeproj/project.pbxproj | 2 +- .../xcshareddata/swiftpm/Package.resolved | 7 +- .../Mocks/Generated/SDKGeneratedMocks.swift | 69 +++++++++++++++++++ .../Mocks/SDK/LeaveSpaceHandleSDKMock.swift | 3 +- .../Services/Spaces/SpaceRoomProxy.swift | 2 +- project.yml | 2 +- 6 files changed, 77 insertions(+), 8 deletions(-) diff --git a/ElementX.xcodeproj/project.pbxproj b/ElementX.xcodeproj/project.pbxproj index 1f706300a..645af78f3 100644 --- a/ElementX.xcodeproj/project.pbxproj +++ b/ElementX.xcodeproj/project.pbxproj @@ -9428,7 +9428,7 @@ repositoryURL = "https://github.com/element-hq/matrix-rust-components-swift"; requirement = { kind = exactVersion; - version = 25.10.02; + version = "25.10.07-2"; }; }; 701C7BEF8F70F7A83E852DCC /* XCRemoteSwiftPackageReference "GZIP" */ = { diff --git a/ElementX.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/ElementX.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index 1e1549510..1b987276b 100644 --- a/ElementX.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/ElementX.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -1,5 +1,4 @@ { - "originHash" : "123c89d756b94a4cfdf4ca86fa4278640fc96854ac223bcef68e5566b0c47018", "pins" : [ { "identity" : "compound-design-tokens", @@ -150,8 +149,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/element-hq/matrix-rust-components-swift", "state" : { - "revision" : "bd2e8c25c5e179b272a0718ac6beca9dcb32f0a3", - "version" : "25.10.2" + "revision" : "8dd60f0967f638f2fd119a315a268c253e20ef52", + "version" : "25.10.7-2" } }, { @@ -326,5 +325,5 @@ } } ], - "version" : 3 + "version" : 2 } diff --git a/ElementX/Sources/Mocks/Generated/SDKGeneratedMocks.swift b/ElementX/Sources/Mocks/Generated/SDKGeneratedMocks.swift index 0cfef4c15..4d90c253b 100644 --- a/ElementX/Sources/Mocks/Generated/SDKGeneratedMocks.swift +++ b/ElementX/Sources/Mocks/Generated/SDKGeneratedMocks.swift @@ -11069,6 +11069,75 @@ open class NotificationSettingsSDKMock: MatrixRustSDK.NotificationSettings, @unc } } + //MARK: - getRawPushRules + + open var getRawPushRulesThrowableError: Error? + var getRawPushRulesUnderlyingCallsCount = 0 + open var getRawPushRulesCallsCount: Int { + get { + if Thread.isMainThread { + return getRawPushRulesUnderlyingCallsCount + } else { + var returnValue: Int? = nil + DispatchQueue.main.sync { + returnValue = getRawPushRulesUnderlyingCallsCount + } + + return returnValue! + } + } + set { + if Thread.isMainThread { + getRawPushRulesUnderlyingCallsCount = newValue + } else { + DispatchQueue.main.sync { + getRawPushRulesUnderlyingCallsCount = newValue + } + } + } + } + open var getRawPushRulesCalled: Bool { + return getRawPushRulesCallsCount > 0 + } + + var getRawPushRulesUnderlyingReturnValue: String? + open var getRawPushRulesReturnValue: String? { + get { + if Thread.isMainThread { + return getRawPushRulesUnderlyingReturnValue + } else { + var returnValue: String?? = nil + DispatchQueue.main.sync { + returnValue = getRawPushRulesUnderlyingReturnValue + } + + return returnValue! + } + } + set { + if Thread.isMainThread { + getRawPushRulesUnderlyingReturnValue = newValue + } else { + DispatchQueue.main.sync { + getRawPushRulesUnderlyingReturnValue = newValue + } + } + } + } + open var getRawPushRulesClosure: (() async throws -> String?)? + + open override func getRawPushRules() async throws -> String? { + if let error = getRawPushRulesThrowableError { + throw error + } + getRawPushRulesCallsCount += 1 + if let getRawPushRulesClosure = getRawPushRulesClosure { + return try await getRawPushRulesClosure() + } else { + return getRawPushRulesReturnValue + } + } + //MARK: - getRoomNotificationSettings open var getRoomNotificationSettingsRoomIdIsEncryptedIsOneToOneThrowableError: Error? diff --git a/ElementX/Sources/Mocks/SDK/LeaveSpaceHandleSDKMock.swift b/ElementX/Sources/Mocks/SDK/LeaveSpaceHandleSDKMock.swift index 0fc9002c8..d52557fde 100644 --- a/ElementX/Sources/Mocks/SDK/LeaveSpaceHandleSDKMock.swift +++ b/ElementX/Sources/Mocks/SDK/LeaveSpaceHandleSDKMock.swift @@ -135,7 +135,8 @@ private extension SpaceRoom { via: [String] = []) { self.init(roomId: id, canonicalAlias: canonicalAlias, - name: name, + displayName: name, + rawName: name, topic: topic, avatarUrl: avatarURL?.absoluteString, roomType: isSpace ? .space : .room, diff --git a/ElementX/Sources/Services/Spaces/SpaceRoomProxy.swift b/ElementX/Sources/Services/Spaces/SpaceRoomProxy.swift index d4511e1cd..a3454ffe9 100644 --- a/ElementX/Sources/Services/Spaces/SpaceRoomProxy.swift +++ b/ElementX/Sources/Services/Spaces/SpaceRoomProxy.swift @@ -16,7 +16,7 @@ class SpaceRoomProxy: SpaceRoomProxyProtocol { } lazy var id = spaceRoom.roomId - var name: String? { spaceRoom.name } + var name: String? { spaceRoom.displayName } var avatarURL: URL? { spaceRoom.avatarUrl.flatMap(URL.init) } var isSpace: Bool { spaceRoom.roomType == .space } diff --git a/project.yml b/project.yml index e11eab633..36c87f596 100644 --- a/project.yml +++ b/project.yml @@ -68,7 +68,7 @@ packages: # Element/Matrix dependencies MatrixRustSDK: url: https://github.com/element-hq/matrix-rust-components-swift - exactVersion: 25.10.02 + exactVersion: 25.10.07-2 # path: ../matrix-rust-sdk Compound: path: compound-ios