mirror of
https://github.com/element-hq/element-x-ios.git
synced 2025-03-10 21:39:12 +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:
parent
6ded867bcc
commit
5e90f67a91
@ -8536,7 +8536,7 @@
|
|||||||
repositoryURL = "https://github.com/element-hq/matrix-rust-components-swift";
|
repositoryURL = "https://github.com/element-hq/matrix-rust-components-swift";
|
||||||
requirement = {
|
requirement = {
|
||||||
kind = exactVersion;
|
kind = exactVersion;
|
||||||
version = 25.02.17;
|
version = 25.02.25;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
701C7BEF8F70F7A83E852DCC /* XCRemoteSwiftPackageReference "GZIP" */ = {
|
701C7BEF8F70F7A83E852DCC /* XCRemoteSwiftPackageReference "GZIP" */ = {
|
||||||
|
@ -149,8 +149,8 @@
|
|||||||
"kind" : "remoteSourceControl",
|
"kind" : "remoteSourceControl",
|
||||||
"location" : "https://github.com/element-hq/matrix-rust-components-swift",
|
"location" : "https://github.com/element-hq/matrix-rust-components-swift",
|
||||||
"state" : {
|
"state" : {
|
||||||
"revision" : "422d7bef3ffd3edcb3e30afb410ee523f5659adc",
|
"revision" : "d5556ad7857c79f53804fbae17cc5232bc2ac493",
|
||||||
"version" : "25.2.17"
|
"version" : "25.2.25"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -591,7 +591,7 @@ class AppCoordinator: AppCoordinatorProtocol, AuthenticationFlowCoordinatorDeleg
|
|||||||
|
|
||||||
Task {
|
Task {
|
||||||
// First log out from the server
|
// First log out from the server
|
||||||
let accountLogoutURL = await userSession.clientProxy.logout()
|
await userSession.clientProxy.logout()
|
||||||
|
|
||||||
// Regardless of the result, clear user data
|
// Regardless of the result, clear user data
|
||||||
userSessionStore.logout(userSession: userSession)
|
userSessionStore.logout(userSession: userSession)
|
||||||
@ -605,12 +605,6 @@ class AppCoordinator: AppCoordinatorProtocol, AuthenticationFlowCoordinatorDeleg
|
|||||||
|
|
||||||
stateMachine.processEvent(.completedSigningOut)
|
stateMachine.processEvent(.completedSigningOut)
|
||||||
|
|
||||||
// Handle OIDC's RP-Initiated Logout if needed. Don't fallback to an ASWebAuthenticationSession
|
|
||||||
// as it looks weird to show an alert to the user asking them to sign in to their provider.
|
|
||||||
if let accountLogoutURL, UIApplication.shared.canOpenURL(accountLogoutURL) {
|
|
||||||
await UIApplication.shared.open(accountLogoutURL)
|
|
||||||
}
|
|
||||||
|
|
||||||
hideLoadingIndicator()
|
hideLoadingIndicator()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -63,7 +63,6 @@ extension ClientProxyMock {
|
|||||||
setUserAvatarMediaReturnValue = .failure(.sdkError(ClientProxyMockError.generic))
|
setUserAvatarMediaReturnValue = .failure(.sdkError(ClientProxyMockError.generic))
|
||||||
removeUserAvatarReturnValue = .failure(.sdkError(ClientProxyMockError.generic))
|
removeUserAvatarReturnValue = .failure(.sdkError(ClientProxyMockError.generic))
|
||||||
isAliasAvailableReturnValue = .success(true)
|
isAliasAvailableReturnValue = .success(true)
|
||||||
logoutReturnValue = nil
|
|
||||||
searchUsersSearchTermLimitReturnValue = .success(.init(results: [], limited: false))
|
searchUsersSearchTermLimitReturnValue = .success(.init(results: [], limited: false))
|
||||||
profileForReturnValue = .success(.init(userID: "@a:b.com", displayName: "Some user"))
|
profileForReturnValue = .success(.init(userID: "@a:b.com", displayName: "Some user"))
|
||||||
ignoreUserReturnValue = .success(())
|
ignoreUserReturnValue = .success(())
|
||||||
|
@ -3658,40 +3658,11 @@ class ClientProxyMock: ClientProxyProtocol, @unchecked Sendable {
|
|||||||
var logoutCalled: Bool {
|
var logoutCalled: Bool {
|
||||||
return logoutCallsCount > 0
|
return logoutCallsCount > 0
|
||||||
}
|
}
|
||||||
|
var logoutClosure: (() async -> Void)?
|
||||||
|
|
||||||
var logoutUnderlyingReturnValue: URL?
|
func logout() async {
|
||||||
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? {
|
|
||||||
logoutCallsCount += 1
|
logoutCallsCount += 1
|
||||||
if let logoutClosure = logoutClosure {
|
await logoutClosure?()
|
||||||
return await logoutClosure()
|
|
||||||
} else {
|
|
||||||
return logoutReturnValue
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
//MARK: - setPusher
|
//MARK: - setPusher
|
||||||
|
|
||||||
|
@ -2526,43 +2526,14 @@ open class ClientSDKMock: MatrixRustSDK.Client, @unchecked Sendable {
|
|||||||
open var logoutCalled: Bool {
|
open var logoutCalled: Bool {
|
||||||
return logoutCallsCount > 0
|
return logoutCallsCount > 0
|
||||||
}
|
}
|
||||||
|
open var logoutClosure: (() async throws -> Void)?
|
||||||
|
|
||||||
var logoutUnderlyingReturnValue: String?
|
open override func logout() async throws {
|
||||||
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? {
|
|
||||||
if let error = logoutThrowableError {
|
if let error = logoutThrowableError {
|
||||||
throw error
|
throw error
|
||||||
}
|
}
|
||||||
logoutCallsCount += 1
|
logoutCallsCount += 1
|
||||||
if let logoutClosure = logoutClosure {
|
try await logoutClosure?()
|
||||||
return try await logoutClosure()
|
|
||||||
} else {
|
|
||||||
return logoutReturnValue
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//MARK: - notificationClient
|
//MARK: - notificationClient
|
||||||
|
@ -584,12 +584,11 @@ class ClientProxy: ClientProxyProtocol {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func logout() async -> URL? {
|
func logout() async {
|
||||||
do {
|
do {
|
||||||
return try await client.logout().flatMap(URL.init(string:))
|
try await client.logout()
|
||||||
} catch {
|
} catch {
|
||||||
MXLog.error("Failed logging out with error: \(error)")
|
MXLog.error("Failed logging out with error: \(error)")
|
||||||
return nil
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -154,7 +154,7 @@ protocol ClientProxyProtocol: AnyObject, MediaLoaderProtocol {
|
|||||||
|
|
||||||
func deactivateAccount(password: String?, eraseData: Bool) async -> Result<Void, ClientProxyError>
|
func deactivateAccount(password: String?, eraseData: Bool) async -> Result<Void, ClientProxyError>
|
||||||
|
|
||||||
func logout() async -> URL?
|
func logout() async
|
||||||
|
|
||||||
func setPusher(with configuration: PusherConfiguration) async throws
|
func setPusher(with configuration: PusherConfiguration) async throws
|
||||||
|
|
||||||
|
@ -22,8 +22,8 @@
|
|||||||
"kind" : "remoteSourceControl",
|
"kind" : "remoteSourceControl",
|
||||||
"location" : "https://github.com/jpsim/Yams",
|
"location" : "https://github.com/jpsim/Yams",
|
||||||
"state" : {
|
"state" : {
|
||||||
"revision" : "2688707e563b44d7d87c29ba6c5ca04ce86ae58b",
|
"revision" : "b4b8042411dc7bbb696300a34a4bf3ba1b7ad19b",
|
||||||
"version" : "5.3.0"
|
"version" : "5.3.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
@ -61,7 +61,7 @@ packages:
|
|||||||
# Element/Matrix dependencies
|
# Element/Matrix dependencies
|
||||||
MatrixRustSDK:
|
MatrixRustSDK:
|
||||||
url: https://github.com/element-hq/matrix-rust-components-swift
|
url: https://github.com/element-hq/matrix-rust-components-swift
|
||||||
exactVersion: 25.02.17
|
exactVersion: 25.02.25
|
||||||
# path: ../matrix-rust-sdk
|
# path: ../matrix-rust-sdk
|
||||||
Compound:
|
Compound:
|
||||||
url: https://github.com/element-hq/compound-ios
|
url: https://github.com/element-hq/compound-ios
|
||||||
|
Loading…
x
Reference in New Issue
Block a user