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

* fix(deps): update dependency org.matrix.rustcomponents:sdk-android to v25.12.17

* Fix changes in the SDK:

`LatestEventValue.Local` doesn't have an `isSending` property anymore, now it has `state: LatestEventValueLocalState`. If this is `HAS_BEEN_SENT`, it's equivalent to a `LatestEventValue.Remote`, we just haven't received the updated value from the SDK yet.
---------

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-12-17 15:08:41 +00:00 committed by GitHub
parent 2fb0751873
commit 74ca4ff9d6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 20 additions and 8 deletions

View file

@ -177,7 +177,7 @@ test_detekt_test = { module = "io.gitlab.arturbosch.detekt:detekt-test", version
# https://github.com/matrix-org/matrix-rust-components-kotlin/commits/main/sdk/sdk-android/src/main/kotlin/org/matrix/rustcomponents/sdk/matrix_sdk_ffi.kt
# All new features should not be implemented in the pull request that upgrades the version, developers should
# only fix API breaks and may add some TODOs.
matrix_sdk = "org.matrix.rustcomponents:sdk-android:25.12.10"
matrix_sdk = "org.matrix.rustcomponents:sdk-android:25.12.17"
# Others
coil = { module = "io.coil-kt.coil3:coil", version.ref = "coil" }

View file

@ -16,6 +16,7 @@ import io.element.android.libraries.matrix.impl.timeline.item.event.TimelineEven
import io.element.android.libraries.matrix.impl.timeline.item.event.map
import org.matrix.rustcomponents.sdk.Room
import org.matrix.rustcomponents.sdk.use
import uniffi.matrix_sdk_ui.LatestEventValueLocalState
import org.matrix.rustcomponents.sdk.LatestEventValue as RustLatestEventValue
class RoomSummaryFactory(
@ -27,13 +28,24 @@ class RoomSummaryFactory(
val latestEvent = room.latestEvent().use { event ->
when (event) {
is RustLatestEventValue.None -> LatestEventValue.None
is RustLatestEventValue.Local -> LatestEventValue.Local(
timestamp = event.timestamp.toLong(),
content = contentMapper.map(event.content),
isSending = event.isSending,
senderId = UserId(event.sender),
senderProfile = event.profile.map(),
)
is RustLatestEventValue.Local -> when (event.state) {
LatestEventValueLocalState.IS_SENDING,
LatestEventValueLocalState.CANNOT_BE_SENT -> LatestEventValue.Local(
timestamp = event.timestamp.toLong(),
content = contentMapper.map(event.content),
isSending = event.state == LatestEventValueLocalState.IS_SENDING,
senderId = UserId(event.sender),
senderProfile = event.profile.map(),
)
// This is the same as a remote event, we just haven't received the local -> remote update yet
LatestEventValueLocalState.HAS_BEEN_SENT -> LatestEventValue.Remote(
timestamp = event.timestamp.toLong(),
content = contentMapper.map(event.content),
senderId = UserId(event.sender),
senderProfile = event.profile.map(),
isOwn = true,
)
}
is RustLatestEventValue.Remote -> LatestEventValue.Remote(
timestamp = event.timestamp.toLong(),
content = contentMapper.map(event.content),