diff --git a/ElementX.xcodeproj/project.pbxproj b/ElementX.xcodeproj/project.pbxproj index 53f6bd336..edbc4ae27 100644 --- a/ElementX.xcodeproj/project.pbxproj +++ b/ElementX.xcodeproj/project.pbxproj @@ -9827,7 +9827,7 @@ repositoryURL = "https://github.com/element-hq/matrix-rust-components-swift"; requirement = { kind = exactVersion; - version = 26.01.23; + version = 26.01.27; }; }; 701C7BEF8F70F7A83E852DCC /* XCRemoteSwiftPackageReference "GZIP" */ = { diff --git a/ElementX.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/ElementX.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index 5cee7cf54..c636a97f4 100644 --- a/ElementX.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/ElementX.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -158,8 +158,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/element-hq/matrix-rust-components-swift", "state" : { - "revision" : "a9fb82ed8fd1417022e52b82ffe9c81d9653296f", - "version" : "26.1.23" + "revision" : "f49e072a6629e69f374cff243319969f34f1f7f4", + "version" : "26.1.27" } }, { diff --git a/SDKMocks/Sources/Generated/SDKGeneratedMocks.swift b/SDKMocks/Sources/Generated/SDKGeneratedMocks.swift index d14160889..2f5def68d 100644 --- a/SDKMocks/Sources/Generated/SDKGeneratedMocks.swift +++ b/SDKMocks/Sources/Generated/SDKGeneratedMocks.swift @@ -6,6 +6,21 @@ 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()) @@ -7994,6 +8009,21 @@ 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()) @@ -15155,6 +15185,81 @@ open class RoomSDKMock: MatrixRustSDK.Room, @unchecked Sendable { try await leaveClosure?() } + //MARK: - listThreads + + open var listThreadsOptsThrowableError: Error? + open var listThreadsOptsUnderlyingCallsCount = 0 + open var listThreadsOptsCallsCount: Int { + get { + if Thread.isMainThread { + return listThreadsOptsUnderlyingCallsCount + } else { + var returnValue: Int? = nil + DispatchQueue.main.sync { + returnValue = listThreadsOptsUnderlyingCallsCount + } + + return returnValue! + } + } + set { + if Thread.isMainThread { + listThreadsOptsUnderlyingCallsCount = newValue + } else { + DispatchQueue.main.sync { + listThreadsOptsUnderlyingCallsCount = newValue + } + } + } + } + open var listThreadsOptsCalled: Bool { + return listThreadsOptsCallsCount > 0 + } + open var listThreadsOptsReceivedOpts: ListThreadsOptions? + open var listThreadsOptsReceivedInvocations: [ListThreadsOptions] = [] + + open var listThreadsOptsUnderlyingReturnValue: ThreadRoots! + open var listThreadsOptsReturnValue: ThreadRoots! { + get { + if Thread.isMainThread { + return listThreadsOptsUnderlyingReturnValue + } else { + var returnValue: ThreadRoots? = nil + DispatchQueue.main.sync { + returnValue = listThreadsOptsUnderlyingReturnValue + } + + return returnValue! + } + } + set { + if Thread.isMainThread { + listThreadsOptsUnderlyingReturnValue = newValue + } else { + DispatchQueue.main.sync { + listThreadsOptsUnderlyingReturnValue = newValue + } + } + } + } + open var listThreadsOptsClosure: ((ListThreadsOptions) async throws -> ThreadRoots)? + + open override func listThreads(opts: ListThreadsOptions) async throws -> ThreadRoots { + if let error = listThreadsOptsThrowableError { + throw error + } + listThreadsOptsCallsCount += 1 + listThreadsOptsReceivedOpts = opts + DispatchQueue.main.async { + self.listThreadsOptsReceivedInvocations.append(opts) + } + if let listThreadsOptsClosure = listThreadsOptsClosure { + return try await listThreadsOptsClosure(opts) + } else { + return listThreadsOptsReturnValue + } + } + //MARK: - loadComposerDraft open var loadComposerDraftThreadRootThrowableError: Error? @@ -21947,6 +22052,21 @@ 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()) @@ -22907,6 +23027,42 @@ open class SpaceRoomListSDKMock: MatrixRustSDK.SpaceRoomList, @unchecked Sendabl } } + //MARK: - reset + + open var resetUnderlyingCallsCount = 0 + open var resetCallsCount: Int { + get { + if Thread.isMainThread { + return resetUnderlyingCallsCount + } else { + var returnValue: Int? = nil + DispatchQueue.main.sync { + returnValue = resetUnderlyingCallsCount + } + + return returnValue! + } + } + set { + if Thread.isMainThread { + resetUnderlyingCallsCount = newValue + } else { + DispatchQueue.main.sync { + resetUnderlyingCallsCount = newValue + } + } + } + } + open var resetCalled: Bool { + return resetCallsCount > 0 + } + open var resetClosure: (() async -> Void)? + + open override func reset() async { + resetCallsCount += 1 + await resetClosure?() + } + //MARK: - rooms open var roomsUnderlyingCallsCount = 0 @@ -25299,6 +25455,21 @@ open class TaskHandleSDKMock: MatrixRustSDK.TaskHandle, @unchecked Sendable { } } } +open class ThreadRootsSDKMock: MatrixRustSDK.ThreadRoots, @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 ThreadSummarySDKMock: MatrixRustSDK.ThreadSummary, @unchecked Sendable { public init() { super.init(noHandle: .init()) @@ -27673,6 +27844,24 @@ open class TimelineEventSDKMock: MatrixRustSDK.TimelineEvent, @unchecked Sendabl } } } +open class TimelineEventFilterSDKMock: MatrixRustSDK.TimelineEventFilter, @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! + static func reset() + { + } +} open class TimelineEventTypeFilterSDKMock: MatrixRustSDK.TimelineEventTypeFilter, @unchecked Sendable { public init() { super.init(noHandle: .init()) diff --git a/project.yml b/project.yml index 81e875ba7..cd11d8487 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.01.23 + exactVersion: 26.01.27 # path: ../matrix-rust-sdk Compound: path: compound-ios