Bump SDK bindings to v26.09.3 (#7637)

Fix API breaks:

- A new `Mentions` room list filter is available.
- `RoomListService.subscribeToRooms` is now `RoomListService.setRoomSubscriptions`.
- `enableAutomaticBackPagination` moved from `Client` to `ClientBuilder`.
This commit is contained in:
Jorge Martin Espinosa
2026-09-07 14:19:19 +02:00
committed by GitHub
parent 79f4e2e06f
commit f0a0700f5d
6 changed files with 16 additions and 12 deletions
+1 -1
View File
@@ -185,7 +185,7 @@ test_detekt_test = { module = "io.gitlab.arturbosch.detekt:detekt-test", version
# https://github.com/matrix-org/matrix-rust-components-kotlin/commits/main/sdk/sdk-android/src/main/kotlin/org/matrix/rustcomponents/sdk/matrix_sdk_ffi.kt # https://github.com/matrix-org/matrix-rust-components-kotlin/commits/main/sdk/sdk-android/src/main/kotlin/org/matrix/rustcomponents/sdk/matrix_sdk_ffi.kt
# All new features should not be implemented in the pull request that upgrades the version, developers should # All new features should not be implemented in the pull request that upgrades the version, developers should
# only fix API breaks and may add some TODOs. # only fix API breaks and may add some TODOs.
matrix_sdk = "org.matrix.rustcomponents:sdk-android:26.08.25" matrix_sdk = "org.matrix.rustcomponents:sdk-android:26.09.3"
# Others # Others
coil = { module = "io.coil-kt.coil3:coil", version.ref = "coil" } coil = { module = "io.coil-kt.coil3:coil", version.ref = "coil" }
@@ -48,10 +48,15 @@ sealed interface RoomListFilter {
) : RoomListFilter ) : RoomListFilter
/** /**
* A filter that matches rooms that are unread. * A filter that matches rooms that has unread notifications.
*/ */
data object Unread : RoomListFilter data object Unread : RoomListFilter
/**
* A filter that matches rooms that have unread mentions.
*/
data object Mentions : RoomListFilter
/** /**
* A filter that matches rooms that are marked as favorite. * A filter that matches rooms that are marked as favorite.
*/ */
@@ -99,6 +99,7 @@ class RustMatrixClientFactory(
isMessageSearchAvailable = isMessageSearchAvailable, isMessageSearchAvailable = isMessageSearchAvailable,
) )
.homeserverUrl(sessionData.homeserverUrl) .homeserverUrl(sessionData.homeserverUrl)
.enableAutomaticBackPagination(featureFlagService.isFeatureEnabled(FeatureFlags.AutomaticBackPagination))
.let { (clientBuilderEnterpriseHook(RustMatrixClientBuilder(it), SessionId(sessionData.userId)) as RustMatrixClientBuilder).inner } .let { (clientBuilderEnterpriseHook(RustMatrixClientBuilder(it), SessionId(sessionData.userId)) as RustMatrixClientBuilder).inner }
.use { it.build() } .use { it.build() }
@@ -127,11 +128,6 @@ class RustMatrixClientFactory(
): RustMatrixClient { ): RustMatrixClient {
val (anonymizedAccessToken, anonymizedRefreshToken) = client.session().anonymizedTokens() val (anonymizedAccessToken, anonymizedRefreshToken) = client.session().anonymizedTokens()
// Must be called before creating the sync service, timelines etc.
if (featureFlagService.isFeatureEnabled(FeatureFlags.AutomaticBackPagination)) {
client.enableAutomaticBackpagination()
}
client.setUtdDelegate(UtdTracker(analyticsService)) client.setUtdDelegate(UtdTracker(analyticsService))
val syncService = client.syncService() val syncService = client.syncService()
@@ -28,7 +28,7 @@ class RoomSyncSubscriber(
withContext(dispatchers.io) { withContext(dispatchers.io) {
try { try {
Timber.d("Subscribing to room $roomId}") Timber.d("Subscribing to room $roomId}")
roomListService.subscribeToRooms(listOf(roomId.value)) roomListService.setRoomSubscriptions(listOf(roomId.value))
} catch (exception: Exception) { } catch (exception: Exception) {
Timber.e(exception, "Failed to subscribe to room $roomId") Timber.e(exception, "Failed to subscribe to room $roomId")
} }
@@ -40,7 +40,7 @@ class RoomSyncSubscriber(
withContext(dispatchers.io) { withContext(dispatchers.io) {
try { try {
Timber.d("Subscribing to rooms: $roomIds") Timber.d("Subscribing to rooms: $roomIds")
roomListService.subscribeToRooms(roomIds.map { it.value }) roomListService.setRoomSubscriptions(roomIds.map { it.value })
} catch (cancellationException: CancellationException) { } catch (cancellationException: CancellationException) {
throw cancellationException throw cancellationException
} catch (exception: Exception) { } catch (exception: Exception) {
@@ -20,9 +20,10 @@ import org.matrix.rustcomponents.sdk.RoomListEntriesDynamicFilterKind.NonLeft
import org.matrix.rustcomponents.sdk.RoomListEntriesDynamicFilterKind.NonSpace import org.matrix.rustcomponents.sdk.RoomListEntriesDynamicFilterKind.NonSpace
import org.matrix.rustcomponents.sdk.RoomListEntriesDynamicFilterKind.None import org.matrix.rustcomponents.sdk.RoomListEntriesDynamicFilterKind.None
import org.matrix.rustcomponents.sdk.RoomListEntriesDynamicFilterKind.NormalizedMatchRoomName import org.matrix.rustcomponents.sdk.RoomListEntriesDynamicFilterKind.NormalizedMatchRoomName
import org.matrix.rustcomponents.sdk.RoomListEntriesDynamicFilterKind.ReadReceipts
import org.matrix.rustcomponents.sdk.RoomListEntriesDynamicFilterKind.Space import org.matrix.rustcomponents.sdk.RoomListEntriesDynamicFilterKind.Space
import org.matrix.rustcomponents.sdk.RoomListEntriesDynamicFilterKind.Unread import uniffi.matrix_sdk_ui.RoomListFilterCategory
import org.matrix.rustcomponents.sdk.RoomListFilterCategory import uniffi.matrix_sdk_ui.RoomListFilterReadReceipts
/** /**
* Mapper for converting RoomListFilter to Rust SDK filter kinds. * Mapper for converting RoomListFilter to Rust SDK filter kinds.
@@ -67,7 +68,8 @@ internal object RoomListFilterMapper {
RoomListFilter.Category.People -> Category(RoomListFilterCategory.PEOPLE) RoomListFilter.Category.People -> Category(RoomListFilterCategory.PEOPLE)
RoomListFilter.Category.Space -> Space RoomListFilter.Category.Space -> Space
RoomListFilter.Favorite -> Favourite RoomListFilter.Favorite -> Favourite
RoomListFilter.Unread -> Unread RoomListFilter.Unread -> ReadReceipts(RoomListFilterReadReceipts.NOTIFICATIONS)
RoomListFilter.Mentions -> ReadReceipts(RoomListFilterReadReceipts.MENTIONS)
is RoomListFilter.NormalizedMatchRoomName -> NormalizedMatchRoomName( is RoomListFilter.NormalizedMatchRoomName -> NormalizedMatchRoomName(
pattern = filter.pattern pattern = filter.pattern
) )
@@ -27,6 +27,7 @@ class FakeFfiClientBuilder(
override fun addRootCertificates(certificates: List<ByteArray>) = this override fun addRootCertificates(certificates: List<ByteArray>) = this
override fun autoEnableBackups(autoEnableBackups: Boolean) = this override fun autoEnableBackups(autoEnableBackups: Boolean) = this
override fun autoEnableCrossSigning(autoEnableCrossSigning: Boolean) = this override fun autoEnableCrossSigning(autoEnableCrossSigning: Boolean) = this
override fun enableAutomaticBackPagination(enableAutomaticBackPagination: Boolean): ClientBuilder = this
override fun backupDownloadStrategy(backupDownloadStrategy: BackupDownloadStrategy) = this override fun backupDownloadStrategy(backupDownloadStrategy: BackupDownloadStrategy) = this
override fun disableAutomaticTokenRefresh() = this override fun disableAutomaticTokenRefresh() = this
override fun disableBuiltInRootCertificates() = this override fun disableBuiltInRootCertificates() = this