mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 12:07:55 +00:00
Fix various new SDK breaking changes.
This commit is contained in:
committed by
Stefan Ceriu
parent
ffe2f726e7
commit
bd49500fa1
@@ -3309,8 +3309,8 @@ class ClientProxyMock: ClientProxyProtocol, @unchecked Sendable {
|
||||
var reportRoomForIdentifierReasonCalled: Bool {
|
||||
return reportRoomForIdentifierReasonCallsCount > 0
|
||||
}
|
||||
var reportRoomForIdentifierReasonReceivedArguments: (identifier: String, reason: String?)?
|
||||
var reportRoomForIdentifierReasonReceivedInvocations: [(identifier: String, reason: String?)] = []
|
||||
var reportRoomForIdentifierReasonReceivedArguments: (identifier: String, reason: String)?
|
||||
var reportRoomForIdentifierReasonReceivedInvocations: [(identifier: String, reason: String)] = []
|
||||
|
||||
var reportRoomForIdentifierReasonUnderlyingReturnValue: Result<Void, ClientProxyError>!
|
||||
var reportRoomForIdentifierReasonReturnValue: Result<Void, ClientProxyError>! {
|
||||
@@ -3336,9 +3336,9 @@ class ClientProxyMock: ClientProxyProtocol, @unchecked Sendable {
|
||||
}
|
||||
}
|
||||
}
|
||||
var reportRoomForIdentifierReasonClosure: ((String, String?) async -> Result<Void, ClientProxyError>)?
|
||||
var reportRoomForIdentifierReasonClosure: ((String, String) async -> Result<Void, ClientProxyError>)?
|
||||
|
||||
func reportRoomForIdentifier(_ identifier: String, reason: String?) async -> Result<Void, ClientProxyError> {
|
||||
func reportRoomForIdentifier(_ identifier: String, reason: String) async -> Result<Void, ClientProxyError> {
|
||||
reportRoomForIdentifierReasonCallsCount += 1
|
||||
reportRoomForIdentifierReasonReceivedArguments = (identifier: identifier, reason: reason)
|
||||
DispatchQueue.main.async {
|
||||
@@ -6946,7 +6946,7 @@ class JoinedRoomProxyMock: JoinedRoomProxyProtocol, @unchecked Sendable {
|
||||
return reportRoomReasonCallsCount > 0
|
||||
}
|
||||
var reportRoomReasonReceivedReason: String?
|
||||
var reportRoomReasonReceivedInvocations: [String?] = []
|
||||
var reportRoomReasonReceivedInvocations: [String] = []
|
||||
|
||||
var reportRoomReasonUnderlyingReturnValue: Result<Void, RoomProxyError>!
|
||||
var reportRoomReasonReturnValue: Result<Void, RoomProxyError>! {
|
||||
@@ -6972,9 +6972,9 @@ class JoinedRoomProxyMock: JoinedRoomProxyProtocol, @unchecked Sendable {
|
||||
}
|
||||
}
|
||||
}
|
||||
var reportRoomReasonClosure: ((String?) async -> Result<Void, RoomProxyError>)?
|
||||
var reportRoomReasonClosure: ((String) async -> Result<Void, RoomProxyError>)?
|
||||
|
||||
func reportRoom(reason: String?) async -> Result<Void, RoomProxyError> {
|
||||
func reportRoom(reason: String) async -> Result<Void, RoomProxyError> {
|
||||
reportRoomReasonCallsCount += 1
|
||||
reportRoomReasonReceivedReason = reason
|
||||
DispatchQueue.main.async {
|
||||
|
||||
@@ -15153,10 +15153,10 @@ open class RoomSDKMock: MatrixRustSDK.Room, @unchecked Sendable {
|
||||
return reportRoomReasonCallsCount > 0
|
||||
}
|
||||
open var reportRoomReasonReceivedReason: String?
|
||||
open var reportRoomReasonReceivedInvocations: [String?] = []
|
||||
open var reportRoomReasonClosure: ((String?) async throws -> Void)?
|
||||
open var reportRoomReasonReceivedInvocations: [String] = []
|
||||
open var reportRoomReasonClosure: ((String) async throws -> Void)?
|
||||
|
||||
open override func reportRoom(reason: String?) async throws {
|
||||
open override func reportRoom(reason: String) async throws {
|
||||
if let error = reportRoomReasonThrowableError {
|
||||
throw error
|
||||
}
|
||||
@@ -19941,7 +19941,6 @@ open class RoomPreviewSDKMock: MatrixRustSDK.RoomPreview, @unchecked Sendable {
|
||||
|
||||
//MARK: - info
|
||||
|
||||
open var infoThrowableError: Error?
|
||||
var infoUnderlyingCallsCount = 0
|
||||
open var infoCallsCount: Int {
|
||||
get {
|
||||
@@ -19994,15 +19993,12 @@ open class RoomPreviewSDKMock: MatrixRustSDK.RoomPreview, @unchecked Sendable {
|
||||
}
|
||||
}
|
||||
}
|
||||
open var infoClosure: (() throws -> RoomPreviewInfo)?
|
||||
open var infoClosure: (() -> RoomPreviewInfo)?
|
||||
|
||||
open override func info() throws -> RoomPreviewInfo {
|
||||
if let error = infoThrowableError {
|
||||
throw error
|
||||
}
|
||||
open override func info() -> RoomPreviewInfo {
|
||||
infoCallsCount += 1
|
||||
if let infoClosure = infoClosure {
|
||||
return try infoClosure()
|
||||
return infoClosure()
|
||||
} else {
|
||||
return infoReturnValue
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user