Rust sdk : update to 0.2.42

This commit is contained in:
ganfra
2024-09-04 16:37:46 +02:00
parent 4fbf98700a
commit 4fe142c624
3 changed files with 6 additions and 1 deletions

View File

@@ -162,7 +162,7 @@ jsoup = "org.jsoup:jsoup:1.18.1"
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.41"
matrix_sdk = "org.matrix.rustcomponents:sdk-android:0.2.42"
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" }

View File

@@ -25,6 +25,8 @@ sealed interface LocalEventSendState {
data object Sending : LocalEventSendState
sealed interface Failed : LocalEventSendState {
data class Unknown(val error: String) : Failed
data object CrossSigningNotSetup : Failed
data object SendingFromUnverifiedDevice : Failed
data class VerifiedUserHasUnsignedDevice(
/**
* The unsigned devices belonging to verified users. A map from user ID

View File

@@ -31,6 +31,7 @@ import io.element.android.libraries.matrix.api.timeline.item.event.TimelineItemE
import kotlinx.collections.immutable.ImmutableList
import kotlinx.collections.immutable.persistentListOf
import kotlinx.collections.immutable.toImmutableList
import org.matrix.rustcomponents.sdk.EventSendState
import org.matrix.rustcomponents.sdk.Reaction
import org.matrix.rustcomponents.sdk.ShieldState
import uniffi.matrix_sdk_common.ShieldStateCode
@@ -98,6 +99,8 @@ fun RustEventSendState?.map(): LocalEventSendState? {
devices = devices.mapKeys { UserId(it.key) }
)
}
EventSendState.CrossSigningNotSetup -> LocalEventSendState.Failed.CrossSigningNotSetup
EventSendState.SendingFromUnverifiedDevice -> LocalEventSendState.Failed.SendingFromUnverifiedDevice
}
}