mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:55:59 +00:00
Account URL is now fetched async (#2769)
This commit is contained in:
@@ -2104,14 +2104,14 @@ class ClientProxyMock: ClientProxyProtocol {
|
||||
}
|
||||
}
|
||||
}
|
||||
var accountURLActionClosure: ((AccountManagementAction) -> URL?)?
|
||||
var accountURLActionClosure: ((AccountManagementAction) async -> URL?)?
|
||||
|
||||
func accountURL(action: AccountManagementAction) -> URL? {
|
||||
func accountURL(action: AccountManagementAction) async -> URL? {
|
||||
accountURLActionCallsCount += 1
|
||||
accountURLActionReceivedAction = action
|
||||
accountURLActionReceivedInvocations.append(action)
|
||||
if let accountURLActionClosure = accountURLActionClosure {
|
||||
return accountURLActionClosure(action)
|
||||
return await accountURLActionClosure(action)
|
||||
} else {
|
||||
return accountURLActionReturnValue
|
||||
}
|
||||
|
||||
@@ -135,9 +135,9 @@ class SDKClientMock: SDKClientProtocol {
|
||||
}
|
||||
}
|
||||
}
|
||||
public var accountUrlActionClosure: ((AccountManagementAction?) throws -> String?)?
|
||||
public var accountUrlActionClosure: ((AccountManagementAction?) async throws -> String?)?
|
||||
|
||||
public func accountUrl(action: AccountManagementAction?) throws -> String? {
|
||||
public func accountUrl(action: AccountManagementAction?) async throws -> String? {
|
||||
if let error = accountUrlActionThrowableError {
|
||||
throw error
|
||||
}
|
||||
@@ -145,7 +145,7 @@ class SDKClientMock: SDKClientProtocol {
|
||||
accountUrlActionReceivedAction = action
|
||||
accountUrlActionReceivedInvocations.append(action)
|
||||
if let accountUrlActionClosure = accountUrlActionClosure {
|
||||
return try accountUrlActionClosure(action)
|
||||
return try await accountUrlActionClosure(action)
|
||||
} else {
|
||||
return accountUrlActionReturnValue
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user