fix(deps): update dependency org.matrix.rustcomponents:sdk-android to v25.6.25 (#4936)

Fix broken API changes:
- `RoomInfo.isPublic` is now optional, so we need to assume its default value in some places of the app.
- `RoomInfo.userPowerLevels` is now `RoomInfo.roomPowerLevels` and also contains this info.
- `ClientBuilder` now uses a `DecryptionSettings` value.
- The call widget settings provider now internally uses a different Rust type.
- `Client.clearCache` now takes a `syncService` so it can stop it.

---

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jorge Martín <jorgem@element.io>
This commit is contained in:
renovate[bot] 2025-06-25 19:25:42 +00:00 committed by GitHub
parent ef9436ed8d
commit 7d3f4cbb09
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
28 changed files with 148 additions and 60 deletions

View file

@ -27,5 +27,5 @@ fun BaseRoom.toAnalyticsViewRoom(
}
private fun BaseRoom.toActiveSpace(): ViewRoom.ActiveSpace {
return if (info().isPublic) ViewRoom.ActiveSpace.Public else ViewRoom.ActiveSpace.Private
return if (info().isPublic == true) ViewRoom.ActiveSpace.Public else ViewRoom.ActiveSpace.Private
}

View file

@ -14,10 +14,10 @@ import io.element.android.libraries.matrix.api.core.RoomId
import io.element.android.libraries.matrix.api.core.UserId
import io.element.android.libraries.matrix.api.room.history.RoomHistoryVisibility
import io.element.android.libraries.matrix.api.room.join.JoinRule
import io.element.android.libraries.matrix.api.room.powerlevels.RoomPowerLevels
import io.element.android.libraries.matrix.api.room.tombstone.SuccessorRoom
import io.element.android.libraries.matrix.api.user.MatrixUser
import kotlinx.collections.immutable.ImmutableList
import kotlinx.collections.immutable.ImmutableMap
@Immutable
data class RoomInfo(
@ -28,7 +28,7 @@ data class RoomInfo(
val rawName: String?,
val topic: String?,
val avatarUrl: String?,
val isPublic: Boolean,
val isPublic: Boolean?,
val isDirect: Boolean,
val isEncrypted: Boolean?,
val joinRule: JoinRule?,
@ -48,7 +48,7 @@ data class RoomInfo(
val activeMembersCount: Long,
val invitedMembersCount: Long,
val joinedMembersCount: Long,
val userPowerLevels: ImmutableMap<UserId, Long>,
val roomPowerLevels: RoomPowerLevels?,
val highlightCount: Long,
val notificationCount: Long,
val userDefinedNotificationMode: RoomNotificationMode?,

View file

@ -22,7 +22,7 @@ import kotlinx.coroutines.flow.map
*/
fun BaseRoom.usersWithRole(role: RoomMember.Role): Flow<ImmutableList<RoomMember>> {
return roomInfoFlow
.map { it.userPowerLevels.filter { (_, powerLevel) -> RoomMember.Role.forPowerLevel(powerLevel) == role } }
.map { it.roomPowerLevels?.users.orEmpty().filter { (_, powerLevel) -> RoomMember.Role.forPowerLevel(powerLevel) == role } }
.combine(membersStateFlow) { powerLevels, membersState ->
membersState.activeRoomMembers()
.filter { powerLevels.containsKey(it.userId) }

View file

@ -0,0 +1,16 @@
/*
* Copyright 2025 New Vector Ltd.
*
* SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
* Please see LICENSE files in the repository root for full details.
*/
package io.element.android.libraries.matrix.api.room.powerlevels
import io.element.android.libraries.matrix.api.core.UserId
import kotlinx.collections.immutable.ImmutableMap
data class RoomPowerLevels(
val values: RoomPowerLevelsValues,
val users: ImmutableMap<UserId, Long>,
)

View file

@ -33,5 +33,5 @@ data class RoomPreviewInfo(
/** the membership of the current user. */
val membership: CurrentUserMembership?,
/** The room's join rule. */
val joinRule: JoinRule,
val joinRule: JoinRule?,
)