Browse Source

Merge pull request #2417 from element-hq/renovate/org.matrix.rustcomponents-sdk-android-0.x

Update dependency org.matrix.rustcomponents:sdk-android to v0.2.3
pull/2425/head
ganfra 7 months ago committed by GitHub
parent
commit
9669f84766
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      gradle/libs.versions.toml
  2. 2
      libraries/eventformatter/impl/src/main/kotlin/io/element/android/libraries/eventformatter/impl/StateContentFormatter.kt
  3. 18
      libraries/eventformatter/impl/src/test/kotlin/io/element/android/libraries/eventformatter/impl/DefaultRoomLastMessageFormatterTest.kt
  4. 2
      libraries/matrix/api/src/main/kotlin/io/element/android/libraries/matrix/api/timeline/item/event/OtherState.kt
  5. 1
      libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/auth/RustMatrixAuthenticationService.kt
  6. 2
      libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/timeline/item/event/TimelineEventContentMapper.kt

2
gradle/libs.versions.toml

@ -152,7 +152,7 @@ jsoup = "org.jsoup:jsoup:1.17.2" @@ -152,7 +152,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:1.3.2"
timber = "com.jakewharton.timber:timber:5.0.1"
matrix_sdk = "org.matrix.rustcomponents:sdk-android:0.2.2"
matrix_sdk = "org.matrix.rustcomponents:sdk-android:0.2.3"
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" }

2
libraries/eventformatter/impl/src/main/kotlin/io/element/android/libraries/eventformatter/impl/StateContentFormatter.kt

@ -170,7 +170,7 @@ class StateContentFormatter @Inject constructor( @@ -170,7 +170,7 @@ class StateContentFormatter @Inject constructor(
"RoomPinnedEvents"
}
}
OtherState.RoomPowerLevels -> when (renderingMode) {
is OtherState.RoomPowerLevels -> when (renderingMode) {
RenderingMode.RoomList -> {
Timber.v("Filtering timeline item for room state change: $content")
null

18
libraries/eventformatter/impl/src/test/kotlin/io/element/android/libraries/eventformatter/impl/DefaultRoomLastMessageFormatterTest.kt

@ -641,9 +641,21 @@ class DefaultRoomLastMessageFormatterTest { @@ -641,9 +641,21 @@ class DefaultRoomLastMessageFormatterTest {
@Config(qualifiers = "en")
fun `Room state change - others must return null`() {
val otherStates = arrayOf(
OtherState.PolicyRuleRoom, OtherState.PolicyRuleServer, OtherState.PolicyRuleUser, OtherState.RoomAliases, OtherState.RoomCanonicalAlias,
OtherState.RoomGuestAccess, OtherState.RoomHistoryVisibility, OtherState.RoomJoinRules, OtherState.RoomPinnedEvents, OtherState.RoomPowerLevels,
OtherState.RoomServerAcl, OtherState.RoomTombstone, OtherState.SpaceChild, OtherState.SpaceParent, OtherState.Custom("custom_event_type")
OtherState.PolicyRuleRoom,
OtherState.PolicyRuleServer,
OtherState.PolicyRuleUser,
OtherState.RoomAliases,
OtherState.RoomCanonicalAlias,
OtherState.RoomGuestAccess,
OtherState.RoomHistoryVisibility,
OtherState.RoomJoinRules,
OtherState.RoomPinnedEvents,
OtherState.RoomPowerLevels(emptyMap()),
OtherState.RoomServerAcl,
OtherState.RoomTombstone,
OtherState.SpaceChild,
OtherState.SpaceParent,
OtherState.Custom("custom_event_type")
)
val results = otherStates.map { state ->

2
libraries/matrix/api/src/main/kotlin/io/element/android/libraries/matrix/api/timeline/item/event/OtherState.kt

@ -33,7 +33,7 @@ sealed interface OtherState { @@ -33,7 +33,7 @@ sealed interface OtherState {
data object RoomJoinRules : OtherState
data class RoomName(val name: String?) : OtherState
data object RoomPinnedEvents : OtherState
data object RoomPowerLevels : OtherState
data class RoomPowerLevels(val users: Map<String, Long>) : OtherState
data object RoomServerAcl : OtherState
data class RoomThirdPartyInvite(val displayName: String?) : OtherState
data object RoomTombstone : OtherState

1
libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/auth/RustMatrixAuthenticationService.kt

@ -65,6 +65,7 @@ class RustMatrixAuthenticationService @Inject constructor( @@ -65,6 +65,7 @@ class RustMatrixAuthenticationService @Inject constructor(
basePath = baseDirectory.absolutePath,
passphrase = pendingPassphrase,
userAgent = userAgentProvider.provide(),
additionalRootCertificates = emptyList(),
oidcConfiguration = oidcConfiguration,
customSlidingSyncProxy = null,
sessionDelegate = null,

2
libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/timeline/item/event/TimelineEventContentMapper.kt

@ -163,7 +163,7 @@ private fun RustOtherState.map(): OtherState { @@ -163,7 +163,7 @@ private fun RustOtherState.map(): OtherState {
RustOtherState.RoomJoinRules -> OtherState.RoomJoinRules
is RustOtherState.RoomName -> OtherState.RoomName(name)
RustOtherState.RoomPinnedEvents -> OtherState.RoomPinnedEvents
RustOtherState.RoomPowerLevels -> OtherState.RoomPowerLevels
is RustOtherState.RoomPowerLevels -> OtherState.RoomPowerLevels(users)
RustOtherState.RoomServerAcl -> OtherState.RoomServerAcl
is RustOtherState.RoomThirdPartyInvite -> OtherState.RoomThirdPartyInvite(displayName)
RustOtherState.RoomTombstone -> OtherState.RoomTombstone

Loading…
Cancel
Save