mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:55:59 +00:00
Bump the RustSDK to v25.2.25, address breaking changes from matrix-org/matrix-rust-sdk/pull/4674
This commit is contained in:
committed by
Stefan Ceriu
parent
6ded867bcc
commit
5e90f67a91
@@ -63,7 +63,6 @@ extension ClientProxyMock {
|
||||
setUserAvatarMediaReturnValue = .failure(.sdkError(ClientProxyMockError.generic))
|
||||
removeUserAvatarReturnValue = .failure(.sdkError(ClientProxyMockError.generic))
|
||||
isAliasAvailableReturnValue = .success(true)
|
||||
logoutReturnValue = nil
|
||||
searchUsersSearchTermLimitReturnValue = .success(.init(results: [], limited: false))
|
||||
profileForReturnValue = .success(.init(userID: "@a:b.com", displayName: "Some user"))
|
||||
ignoreUserReturnValue = .success(())
|
||||
|
||||
@@ -3658,40 +3658,11 @@ class ClientProxyMock: ClientProxyProtocol, @unchecked Sendable {
|
||||
var logoutCalled: Bool {
|
||||
return logoutCallsCount > 0
|
||||
}
|
||||
var logoutClosure: (() async -> Void)?
|
||||
|
||||
var logoutUnderlyingReturnValue: URL?
|
||||
var logoutReturnValue: URL? {
|
||||
get {
|
||||
if Thread.isMainThread {
|
||||
return logoutUnderlyingReturnValue
|
||||
} else {
|
||||
var returnValue: URL?? = nil
|
||||
DispatchQueue.main.sync {
|
||||
returnValue = logoutUnderlyingReturnValue
|
||||
}
|
||||
|
||||
return returnValue!
|
||||
}
|
||||
}
|
||||
set {
|
||||
if Thread.isMainThread {
|
||||
logoutUnderlyingReturnValue = newValue
|
||||
} else {
|
||||
DispatchQueue.main.sync {
|
||||
logoutUnderlyingReturnValue = newValue
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
var logoutClosure: (() async -> URL?)?
|
||||
|
||||
func logout() async -> URL? {
|
||||
func logout() async {
|
||||
logoutCallsCount += 1
|
||||
if let logoutClosure = logoutClosure {
|
||||
return await logoutClosure()
|
||||
} else {
|
||||
return logoutReturnValue
|
||||
}
|
||||
await logoutClosure?()
|
||||
}
|
||||
//MARK: - setPusher
|
||||
|
||||
|
||||
@@ -2526,43 +2526,14 @@ open class ClientSDKMock: MatrixRustSDK.Client, @unchecked Sendable {
|
||||
open var logoutCalled: Bool {
|
||||
return logoutCallsCount > 0
|
||||
}
|
||||
open var logoutClosure: (() async throws -> Void)?
|
||||
|
||||
var logoutUnderlyingReturnValue: String?
|
||||
open var logoutReturnValue: String? {
|
||||
get {
|
||||
if Thread.isMainThread {
|
||||
return logoutUnderlyingReturnValue
|
||||
} else {
|
||||
var returnValue: String?? = nil
|
||||
DispatchQueue.main.sync {
|
||||
returnValue = logoutUnderlyingReturnValue
|
||||
}
|
||||
|
||||
return returnValue!
|
||||
}
|
||||
}
|
||||
set {
|
||||
if Thread.isMainThread {
|
||||
logoutUnderlyingReturnValue = newValue
|
||||
} else {
|
||||
DispatchQueue.main.sync {
|
||||
logoutUnderlyingReturnValue = newValue
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
open var logoutClosure: (() async throws -> String?)?
|
||||
|
||||
open override func logout() async throws -> String? {
|
||||
open override func logout() async throws {
|
||||
if let error = logoutThrowableError {
|
||||
throw error
|
||||
}
|
||||
logoutCallsCount += 1
|
||||
if let logoutClosure = logoutClosure {
|
||||
return try await logoutClosure()
|
||||
} else {
|
||||
return logoutReturnValue
|
||||
}
|
||||
try await logoutClosure?()
|
||||
}
|
||||
|
||||
//MARK: - notificationClient
|
||||
|
||||
Reference in New Issue
Block a user