Skip to content

Commit 259fe53

Browse files
authored
Merge pull request #4018 from element-hq/renovate/org.matrix.rustcomponents-sdk-android-0.x
Update dependency org.matrix.rustcomponents:sdk-android to v0.2.70
2 parents 06d6ba1 + 11ebe16 commit 259fe53

File tree

6 files changed

+9
-2
lines changed

6 files changed

+9
-2
lines changed

gradle/libs.versions.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ jsoup = "org.jsoup:jsoup:1.18.1"
173173
appyx_core = { module = "com.bumble.appyx:core", version.ref = "appyx" }
174174
molecule-runtime = "app.cash.molecule:molecule-runtime:2.0.0"
175175
timber = "com.jakewharton.timber:timber:5.0.1"
176-
matrix_sdk = "org.matrix.rustcomponents:sdk-android:0.2.69"
176+
matrix_sdk = "org.matrix.rustcomponents:sdk-android:0.2.70"
177177
matrix_richtexteditor = { module = "io.element.android:wysiwyg", version.ref = "wysiwyg" }
178178
matrix_richtexteditor_compose = { module = "io.element.android:wysiwyg-compose", version.ref = "wysiwyg" }
179179
sqldelight-driver-android = { module = "app.cash.sqldelight:android-driver", version.ref = "sqldelight" }

libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/RustMatrixClientFactory.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,9 @@ class RustMatrixClientFactory @Inject constructor(
109109
.addRootCertificates(userCertificatesProvider.provides())
110110
.autoEnableBackups(true)
111111
.autoEnableCrossSigning(true)
112+
// TODO Add a feature flag to enable persistent storage
113+
// See https://github.com/matrix-org/matrix-rust-sdk/pull/4396
114+
.useEventCachePersistentStorage(false)
112115
.roomKeyRecipientStrategy(
113116
strategy = if (featureFlagService.isFeatureEnabled(FeatureFlags.OnlySignedDeviceIsolationMode)) {
114117
CollectStrategy.IdentityBasedStrategy

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ fun Throwable.mapAuthenticationException(): AuthenticationException {
2222
is ClientBuildException.SlidingSync -> AuthenticationException.Generic(message)
2323
is ClientBuildException.WellKnownDeserializationException -> AuthenticationException.Generic(message)
2424
is ClientBuildException.WellKnownLookupFailed -> AuthenticationException.Generic(message)
25+
is ClientBuildException.EventCache -> AuthenticationException.Generic(message)
2526
}
2627
else -> AuthenticationException.Generic(message)
2728
}

libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/timeline/item/virtual/VirtualTimelineItemMapper.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import org.matrix.rustcomponents.sdk.VirtualTimelineItem as RustVirtualTimelineI
1313
class VirtualTimelineItemMapper {
1414
fun map(virtualTimelineItem: RustVirtualTimelineItem): VirtualTimelineItem {
1515
return when (virtualTimelineItem) {
16-
is RustVirtualTimelineItem.DayDivider -> VirtualTimelineItem.DayDivider(virtualTimelineItem.ts.toLong())
16+
is RustVirtualTimelineItem.DateDivider -> VirtualTimelineItem.DayDivider(virtualTimelineItem.ts.toLong())
1717
RustVirtualTimelineItem.ReadMarker -> VirtualTimelineItem.ReadMarker
1818
}
1919
}

libraries/matrix/impl/src/test/kotlin/io/element/android/libraries/matrix/impl/auth/AuthenticationExceptionMappingTest.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ class AuthenticationExceptionMappingTest {
5252
.isException<AuthenticationException.Generic>("WellKnown Deserialization")
5353
assertThat(ClientBuildException.WellKnownLookupFailed("WellKnown Lookup Failed").mapAuthenticationException())
5454
.isException<AuthenticationException.Generic>("WellKnown Lookup Failed")
55+
assertThat(ClientBuildException.EventCache("EventCache error").mapAuthenticationException())
56+
.isException<AuthenticationException.Generic>("EventCache error")
5557
}
5658

5759
private inline fun <reified T> ThrowableSubject.isException(message: String) {

libraries/matrix/impl/src/test/kotlin/io/element/android/libraries/matrix/impl/fixtures/fakes/FakeRustClientBuilder.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ class FakeRustClientBuilder : ClientBuilder(NoPointer) {
4141
override fun slidingSyncVersionBuilder(versionBuilder: SlidingSyncVersionBuilder) = this
4242
override fun userAgent(userAgent: String) = this
4343
override fun username(username: String) = this
44+
override fun useEventCachePersistentStorage(value: Boolean) = this
4445

4546
override suspend fun buildWithQrCode(qrCodeData: QrCodeData, oidcConfiguration: OidcConfiguration, progressListener: QrLoginProgressListener): Client {
4647
return FakeRustClient()

0 commit comments

Comments
 (0)