From 843fc17dc3535d9edacfac1b50a476ecf4ad63e1 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 23 Jun 2023 10:47:59 +0000 Subject: [PATCH 1/2] Update dependency org.matrix.rustcomponents:sdk-android to v0.1.23 --- 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 86a18b013b..0e52d74d29 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -142,7 +142,7 @@ jsoup = { module = "org.jsoup:jsoup", version.ref = "jsoup" } appyx_core = { module = "com.bumble.appyx:core", version.ref = "appyx" } molecule-runtime = { module = "app.cash.molecule:molecule-runtime", version.ref = "molecule" } timber = "com.jakewharton.timber:timber:5.0.1" -matrix_sdk = "org.matrix.rustcomponents:sdk-android:0.1.22" +matrix_sdk = "org.matrix.rustcomponents:sdk-android:0.1.23" sqldelight-driver-android = { module = "com.squareup.sqldelight:android-driver", version.ref = "sqldelight" } sqldelight-driver-jvm = { module = "com.squareup.sqldelight:sqlite-driver", version.ref = "sqldelight" } sqldelight-coroutines = { module = "com.squareup.sqldelight:coroutines-extensions", version.ref = "sqldelight" } From d85ef79f20f0442982fe72b98d5f9a4692a89a0b Mon Sep 17 00:00:00 2001 From: ganfra Date: Fri, 23 Jun 2023 17:22:08 +0200 Subject: [PATCH 2/2] Rust sdk update: make the project compiling --- .../libraries/matrix/api/timeline/item/event/EventSendState.kt | 1 + .../matrix/impl/notification/RustNotificationService.kt | 2 +- .../matrix/impl/timeline/item/event/EventTimelineItemMapper.kt | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/libraries/matrix/api/src/main/kotlin/io/element/android/libraries/matrix/api/timeline/item/event/EventSendState.kt b/libraries/matrix/api/src/main/kotlin/io/element/android/libraries/matrix/api/timeline/item/event/EventSendState.kt index d41bc2edc0..0c70096b1a 100644 --- a/libraries/matrix/api/src/main/kotlin/io/element/android/libraries/matrix/api/timeline/item/event/EventSendState.kt +++ b/libraries/matrix/api/src/main/kotlin/io/element/android/libraries/matrix/api/timeline/item/event/EventSendState.kt @@ -20,6 +20,7 @@ import io.element.android.libraries.matrix.api.core.EventId sealed interface EventSendState { object NotSentYet : EventSendState + object Canceled : EventSendState data class SendingFailed( val error: String diff --git a/libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/notification/RustNotificationService.kt b/libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/notification/RustNotificationService.kt index 8b630cd64a..52d1598cff 100644 --- a/libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/notification/RustNotificationService.kt +++ b/libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/notification/RustNotificationService.kt @@ -35,7 +35,7 @@ class RustNotificationService( eventId: EventId ): Result { return runCatching { - client.getNotificationItem(roomId.value, eventId.value).use(notificationMapper::map) + client.getNotificationItem(roomId.value, eventId.value)?.use(notificationMapper::map) } } } diff --git a/libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/timeline/item/event/EventTimelineItemMapper.kt b/libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/timeline/item/event/EventTimelineItemMapper.kt index bbb9c8fe2a..d8bb928d8f 100644 --- a/libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/timeline/item/event/EventTimelineItemMapper.kt +++ b/libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/timeline/item/event/EventTimelineItemMapper.kt @@ -70,6 +70,7 @@ fun RustEventSendState?.map(): EventSendState? { RustEventSendState.NotSentYet -> EventSendState.NotSentYet is RustEventSendState.SendingFailed -> EventSendState.SendingFailed(error) is RustEventSendState.Sent -> EventSendState.Sent(EventId(eventId)) + RustEventSendState.Cancelled -> EventSendState.Canceled } }