diff --git a/ElementX.xcodeproj/project.pbxproj b/ElementX.xcodeproj/project.pbxproj index 22471f5fe..8d767a78b 100644 --- a/ElementX.xcodeproj/project.pbxproj +++ b/ElementX.xcodeproj/project.pbxproj @@ -9845,7 +9845,7 @@ repositoryURL = "https://github.com/element-hq/matrix-rust-components-swift"; requirement = { kind = exactVersion; - version = 26.03.05; + version = 26.03.10; }; }; 701C7BEF8F70F7A83E852DCC /* XCRemoteSwiftPackageReference "GZIP" */ = { diff --git a/ElementX.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/ElementX.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index 18779c268..ac012061d 100644 --- a/ElementX.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/ElementX.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -1,5 +1,5 @@ { - "originHash" : "843c4d0258fd38eefc28c84abdbee51de717ba76dd57e3de1c054e711e306d15", + "originHash" : "8eb9025bb2afabd4f0794636164b32d8b7ed94d2c00e6d7016184f2cdecd87b2", "pins" : [ { "identity" : "compound-design-tokens", @@ -159,8 +159,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/element-hq/matrix-rust-components-swift", "state" : { - "revision" : "cb36bdbc40b3b3a867306d105d0e21b296934801", - "version" : "26.3.5" + "revision" : "5f6444d7c6c90d35fe3cef44167944b414187436", + "version" : "26.3.10" } }, { diff --git a/ElementX/Sources/Services/Room/JoinedRoomProxy.swift b/ElementX/Sources/Services/Room/JoinedRoomProxy.swift index 7e1224d6d..fdeea7918 100644 --- a/ElementX/Sources/Services/Room/JoinedRoomProxy.swift +++ b/ElementX/Sources/Services/Room/JoinedRoomProxy.swift @@ -306,7 +306,7 @@ class JoinedRoomProxy: JoinedRoomProxyProtocol { func reportContent(_ eventID: String, reason: String?) async -> Result { do { - try await room.reportContent(eventId: eventID, score: nil, reason: reason) + try await room.reportContent(eventId: eventID, reason: reason) return .success(()) } catch { MXLog.error("Failed reporting eventID: \(eventID) with error: \(error)") diff --git a/ElementX/Sources/Services/Room/RoomSummary/RoomEventStringBuilder.swift b/ElementX/Sources/Services/Room/RoomSummary/RoomEventStringBuilder.swift index 1d8835852..c869229bf 100644 --- a/ElementX/Sources/Services/Room/RoomSummary/RoomEventStringBuilder.swift +++ b/ElementX/Sources/Services/Room/RoomSummary/RoomEventStringBuilder.swift @@ -86,6 +86,9 @@ struct RoomEventStringBuilder { return prefix(L10n.commonUnsupportedCall, with: displayName, isOutgoing: isOutgoing) case .rtcNotification: return prefix(L10n.commonCallStarted, with: displayName, isOutgoing: isOutgoing) + case .liveLocation: + // TODO: Implement + return nil } } diff --git a/ElementX/Sources/Services/Timeline/TimelineItems/RoomTimelineItemFactory.swift b/ElementX/Sources/Services/Timeline/TimelineItems/RoomTimelineItemFactory.swift index dbc8cb1fa..6779c02c4 100644 --- a/ElementX/Sources/Services/Timeline/TimelineItems/RoomTimelineItemFactory.swift +++ b/ElementX/Sources/Services/Timeline/TimelineItems/RoomTimelineItemFactory.swift @@ -69,6 +69,9 @@ struct RoomTimelineItemFactory: RoomTimelineItemFactoryProtocol { return buildCallInviteTimelineItem(for: eventItemProxy) case .rtcNotification: return buildCallNotificationTimelineItem(for: eventItemProxy) + case .liveLocation: + // TODO: Implement + return nil } } diff --git a/SDKMocks/Sources/Generated/SDKGeneratedMocks.swift b/SDKMocks/Sources/Generated/SDKGeneratedMocks.swift index 20715b5f3..cc1912f70 100644 --- a/SDKMocks/Sources/Generated/SDKGeneratedMocks.swift +++ b/SDKMocks/Sources/Generated/SDKGeneratedMocks.swift @@ -6,21 +6,6 @@ import Foundation -open class BackupSecretsSDKMock: MatrixRustSDK.BackupSecrets, @unchecked Sendable { - public init() { - super.init(noHandle: .init()) - } - - public required init(unsafeFromHandle handle: UInt64) { - fatalError("init(unsafeFromHandle:) has not been implemented") - } - - fileprivate var handle: UInt64 { - get { return underlyingHandle } - set(value) { underlyingHandle = value } - } - fileprivate var underlyingHandle: UInt64! -} open class CheckCodeSenderSDKMock: MatrixRustSDK.CheckCodeSender, @unchecked Sendable { public init() { super.init(noHandle: .init()) @@ -8015,21 +8000,6 @@ open class ClientBuilderSDKMock: MatrixRustSDK.ClientBuilder, @unchecked Sendabl } } } -open class CrossSigningSecretsSDKMock: MatrixRustSDK.CrossSigningSecrets, @unchecked Sendable { - public init() { - super.init(noHandle: .init()) - } - - public required init(unsafeFromHandle handle: UInt64) { - fatalError("init(unsafeFromHandle:) has not been implemented") - } - - fileprivate var handle: UInt64 { - get { return underlyingHandle } - set(value) { underlyingHandle = value } - } - fileprivate var underlyingHandle: UInt64! -} open class EncryptionSDKMock: MatrixRustSDK.Encryption, @unchecked Sendable { public init() { super.init(noHandle: .init()) @@ -8719,6 +8689,52 @@ open class EncryptionSDKMock: MatrixRustSDK.Encryption, @unchecked Sendable { try await recoverRecoveryKeyClosure?(recoveryKey) } + //MARK: - recoverAndFixBackup + + open var recoverAndFixBackupRecoveryKeyThrowableError: Error? + open var recoverAndFixBackupRecoveryKeyUnderlyingCallsCount = 0 + open var recoverAndFixBackupRecoveryKeyCallsCount: Int { + get { + if Thread.isMainThread { + return recoverAndFixBackupRecoveryKeyUnderlyingCallsCount + } else { + var returnValue: Int? = nil + DispatchQueue.main.sync { + returnValue = recoverAndFixBackupRecoveryKeyUnderlyingCallsCount + } + + return returnValue! + } + } + set { + if Thread.isMainThread { + recoverAndFixBackupRecoveryKeyUnderlyingCallsCount = newValue + } else { + DispatchQueue.main.sync { + recoverAndFixBackupRecoveryKeyUnderlyingCallsCount = newValue + } + } + } + } + open var recoverAndFixBackupRecoveryKeyCalled: Bool { + return recoverAndFixBackupRecoveryKeyCallsCount > 0 + } + open var recoverAndFixBackupRecoveryKeyReceivedRecoveryKey: String? + open var recoverAndFixBackupRecoveryKeyReceivedInvocations: [String] = [] + open var recoverAndFixBackupRecoveryKeyClosure: ((String) async throws -> Void)? + + open override func recoverAndFixBackup(recoveryKey: String) async throws { + if let error = recoverAndFixBackupRecoveryKeyThrowableError { + throw error + } + recoverAndFixBackupRecoveryKeyCallsCount += 1 + recoverAndFixBackupRecoveryKeyReceivedRecoveryKey = recoveryKey + DispatchQueue.main.async { + self.recoverAndFixBackupRecoveryKeyReceivedInvocations.append(recoveryKey) + } + try await recoverAndFixBackupRecoveryKeyClosure?(recoveryKey) + } + //MARK: - recoverAndReset open var recoverAndResetOldRecoveryKeyThrowableError: Error? @@ -16663,16 +16679,16 @@ open class RoomSDKMock: MatrixRustSDK.Room, @unchecked Sendable { //MARK: - reportContent - open var reportContentEventIdScoreReasonThrowableError: Error? - open var reportContentEventIdScoreReasonUnderlyingCallsCount = 0 - open var reportContentEventIdScoreReasonCallsCount: Int { + open var reportContentEventIdReasonThrowableError: Error? + open var reportContentEventIdReasonUnderlyingCallsCount = 0 + open var reportContentEventIdReasonCallsCount: Int { get { if Thread.isMainThread { - return reportContentEventIdScoreReasonUnderlyingCallsCount + return reportContentEventIdReasonUnderlyingCallsCount } else { var returnValue: Int? = nil DispatchQueue.main.sync { - returnValue = reportContentEventIdScoreReasonUnderlyingCallsCount + returnValue = reportContentEventIdReasonUnderlyingCallsCount } return returnValue! @@ -16680,31 +16696,31 @@ open class RoomSDKMock: MatrixRustSDK.Room, @unchecked Sendable { } set { if Thread.isMainThread { - reportContentEventIdScoreReasonUnderlyingCallsCount = newValue + reportContentEventIdReasonUnderlyingCallsCount = newValue } else { DispatchQueue.main.sync { - reportContentEventIdScoreReasonUnderlyingCallsCount = newValue + reportContentEventIdReasonUnderlyingCallsCount = newValue } } } } - open var reportContentEventIdScoreReasonCalled: Bool { - return reportContentEventIdScoreReasonCallsCount > 0 + open var reportContentEventIdReasonCalled: Bool { + return reportContentEventIdReasonCallsCount > 0 } - open var reportContentEventIdScoreReasonReceivedArguments: (eventId: String, score: Int32?, reason: String?)? - open var reportContentEventIdScoreReasonReceivedInvocations: [(eventId: String, score: Int32?, reason: String?)] = [] - open var reportContentEventIdScoreReasonClosure: ((String, Int32?, String?) async throws -> Void)? + open var reportContentEventIdReasonReceivedArguments: (eventId: String, reason: String?)? + open var reportContentEventIdReasonReceivedInvocations: [(eventId: String, reason: String?)] = [] + open var reportContentEventIdReasonClosure: ((String, String?) async throws -> Void)? - open override func reportContent(eventId: String, score: Int32?, reason: String?) async throws { - if let error = reportContentEventIdScoreReasonThrowableError { + open override func reportContent(eventId: String, reason: String?) async throws { + if let error = reportContentEventIdReasonThrowableError { throw error } - reportContentEventIdScoreReasonCallsCount += 1 - reportContentEventIdScoreReasonReceivedArguments = (eventId: eventId, score: score, reason: reason) + reportContentEventIdReasonCallsCount += 1 + reportContentEventIdReasonReceivedArguments = (eventId: eventId, reason: reason) DispatchQueue.main.async { - self.reportContentEventIdScoreReasonReceivedInvocations.append((eventId: eventId, score: score, reason: reason)) + self.reportContentEventIdReasonReceivedInvocations.append((eventId: eventId, reason: reason)) } - try await reportContentEventIdScoreReasonClosure?(eventId, score, reason) + try await reportContentEventIdReasonClosure?(eventId, reason) } //MARK: - reportRoom @@ -22058,21 +22074,6 @@ open class RoomPreviewSDKMock: MatrixRustSDK.RoomPreview, @unchecked Sendable { } } } -open class SecretsBundleSDKMock: MatrixRustSDK.SecretsBundle, @unchecked Sendable { - public init() { - super.init(noHandle: .init()) - } - - public required init(unsafeFromHandle handle: UInt64) { - fatalError("init(unsafeFromHandle:) has not been implemented") - } - - fileprivate var handle: UInt64 { - get { return underlyingHandle } - set(value) { underlyingHandle = value } - } - fileprivate var underlyingHandle: UInt64! -} open class SendAttachmentJoinHandleSDKMock: MatrixRustSDK.SendAttachmentJoinHandle, @unchecked Sendable { public init() { super.init(noHandle: .init()) diff --git a/project.yml b/project.yml index ba10e3700..e71abc7a1 100644 --- a/project.yml +++ b/project.yml @@ -73,7 +73,7 @@ packages: # Element/Matrix dependencies MatrixRustSDK: url: https://github.com/element-hq/matrix-rust-components-swift - exactVersion: 26.03.05 + exactVersion: 26.03.10 # path: ../matrix-rust-sdk Compound: path: compound-ios