mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 16:10:20 +00:00
SDK update (#3891)
* Bump the RustSDK to v25.03.11 * Replace oidc login prompt with nil following the changes from https://github.com/matrix-org/matrix-rust-sdk/pull/4761 ``` /// * `prompt` - The desired user experience in the web UI. No value means /// that the user wishes to login into an existing account, and a value of /// `Create` means that the user wishes to register a new account. ``` * Fix trailing closure warnings * Update the client proxy after making `getNotificationSettings()` and `cachedAvatarUrl()` async (they used to be blocking on the rust side). * Move `Room.isEncrypted` to the info publisher and manually update the encryption state when creating the room. * Bump the SDK again to v25.03.12 - This introduces a new way to configure the tokio runtime that we can use to have extensions use less memory - introduce a new Target struct that takes care of setting up rust services (tracing and tokio) for our various targets - cleanup MXLog and friends * Address PR comments * Bump the SDK again, switch back to using `.consent` as the OIDC login prompt (which was reintroduced in matrix-org/matrix-rust-sdk/pull/4791)
This commit is contained in:
@@ -148,7 +148,7 @@ class ClientProxy: ClientProxyProtocol {
|
||||
|
||||
mediaLoader = MediaLoader(client: client)
|
||||
|
||||
notificationSettings = NotificationSettingsProxy(notificationSettings: client.getNotificationSettings())
|
||||
notificationSettings = await NotificationSettingsProxy(notificationSettings: client.getNotificationSettings())
|
||||
|
||||
secureBackupController = SecureBackupController(encryption: client.encryption())
|
||||
|
||||
@@ -525,11 +525,11 @@ class ClientProxy: ClientProxyProtocol {
|
||||
}
|
||||
|
||||
func roomSummaryForIdentifier(_ identifier: String) -> RoomSummary? {
|
||||
staticRoomSummaryProvider.roomListPublisher.value.first(where: { $0.id == identifier })
|
||||
staticRoomSummaryProvider.roomListPublisher.value.first { $0.id == identifier }
|
||||
}
|
||||
|
||||
func roomSummaryForAlias(_ alias: String) -> RoomSummary? {
|
||||
staticRoomSummaryProvider.roomListPublisher.value.first(where: { $0.canonicalAlias == alias || $0.alternativeAliases.contains(alias) })
|
||||
staticRoomSummaryProvider.roomListPublisher.value.first { $0.canonicalAlias == alias || $0.alternativeAliases.contains(alias) }
|
||||
}
|
||||
|
||||
func loadUserDisplayName() async -> Result<Void, ClientProxyError> {
|
||||
@@ -806,16 +806,13 @@ class ClientProxy: ClientProxyProtocol {
|
||||
|
||||
private func loadUserAvatarURLFromCache() {
|
||||
loadCachedAvatarURLTask = Task {
|
||||
let urlString = await Task.dispatch(on: clientQueue) {
|
||||
do {
|
||||
return try self.client.cachedAvatarUrl()
|
||||
} catch {
|
||||
MXLog.error("Failed to look for the avatar url in the cache: \(error)")
|
||||
return nil
|
||||
}
|
||||
do {
|
||||
let urlString = try await self.client.cachedAvatarUrl()
|
||||
guard !Task.isCancelled else { return }
|
||||
self.userAvatarURLSubject.value = urlString.flatMap(URL.init)
|
||||
} catch {
|
||||
MXLog.error("Failed to look for the avatar url in the cache: \(error)")
|
||||
}
|
||||
guard !Task.isCancelled else { return }
|
||||
self.userAvatarURLSubject.value = urlString.flatMap(URL.init)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user