Merge pull request #667 from vector-im/update-rust-sdk-0.1.23

Update rust sdk 0.1.23
This commit is contained in:
ganfra
2023-06-23 17:40:23 +02:00
committed by GitHub
4 changed files with 4 additions and 2 deletions

View File

@@ -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" }

View File

@@ -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

View File

@@ -35,7 +35,7 @@ class RustNotificationService(
eventId: EventId
): Result<NotificationData?> {
return runCatching {
client.getNotificationItem(roomId.value, eventId.value).use(notificationMapper::map)
client.getNotificationItem(roomId.value, eventId.value)?.use(notificationMapper::map)
}
}
}

View File

@@ -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
}
}