From 0826a94a5dcde9ca86619c84714c7e86753481b9 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 1 Jul 2024 15:08:32 +0000 Subject: [PATCH 1/2] Update dependency org.matrix.rustcomponents:sdk-android to v0.2.29 --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 545169a1dc..198250a98c 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -161,7 +161,7 @@ jsoup = "org.jsoup:jsoup:1.17.2" appyx_core = { module = "com.bumble.appyx:core", version.ref = "appyx" } molecule-runtime = "app.cash.molecule:molecule-runtime:2.0.0" timber = "com.jakewharton.timber:timber:5.0.1" -matrix_sdk = "org.matrix.rustcomponents:sdk-android:0.2.28" +matrix_sdk = "org.matrix.rustcomponents:sdk-android:0.2.29" matrix_richtexteditor = { module = "io.element.android:wysiwyg", version.ref = "wysiwyg" } matrix_richtexteditor_compose = { module = "io.element.android:wysiwyg-compose", version.ref = "wysiwyg" } sqldelight-driver-android = { module = "app.cash.sqldelight:android-driver", version.ref = "sqldelight" } From 2a7154b53ee15e3b69327ad8c0004c90bffe53a2 Mon Sep 17 00:00:00 2001 From: ganfra Date: Mon, 1 Jul 2024 17:50:29 +0200 Subject: [PATCH 2/2] Rust sdk : handle api changes (draft and edit) --- .../libraries/matrix/impl/room/draft/ComposerDraftMapper.kt | 4 ++-- .../android/libraries/matrix/impl/timeline/RustTimeline.kt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/room/draft/ComposerDraftMapper.kt b/libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/room/draft/ComposerDraftMapper.kt index d3726d75c5..b8e6ead3b9 100644 --- a/libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/room/draft/ComposerDraftMapper.kt +++ b/libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/room/draft/ComposerDraftMapper.kt @@ -19,8 +19,8 @@ package io.element.android.libraries.matrix.impl.room.draft import io.element.android.libraries.matrix.api.core.EventId import io.element.android.libraries.matrix.api.room.draft.ComposerDraft import io.element.android.libraries.matrix.api.room.draft.ComposerDraftType -import uniffi.matrix_sdk_base.ComposerDraft as RustComposerDraft -import uniffi.matrix_sdk_base.ComposerDraftType as RustComposerDraftType +import org.matrix.rustcomponents.sdk.ComposerDraft as RustComposerDraft +import org.matrix.rustcomponents.sdk.ComposerDraftType as RustComposerDraftType internal fun ComposerDraft.into(): RustComposerDraft { return RustComposerDraft( diff --git a/libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/timeline/RustTimeline.kt b/libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/timeline/RustTimeline.kt index cafcc5e94a..582d658f67 100644 --- a/libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/timeline/RustTimeline.kt +++ b/libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/timeline/RustTimeline.kt @@ -327,7 +327,7 @@ class RustTimeline( runCatching { when { originalEventId != null -> { - inner.edit( + inner.editByEventId( newContent = messageEventContentFromParts(body, htmlBody).withMentions(mentions.map()), eventId = originalEventId.value, )