Bump the RustSDK to v1.0.71-alpha, adopt latest sliding sync range API

This commit is contained in:
Stefan Ceriu
2023-05-30 19:26:57 +03:00
committed by Stefan Ceriu
parent 6b6ea118e2
commit 30c39130fc
5 changed files with 7 additions and 8 deletions
+1 -1
View File
@@ -4778,7 +4778,7 @@
repositoryURL = "https://github.com/matrix-org/matrix-rust-components-swift"; repositoryURL = "https://github.com/matrix-org/matrix-rust-components-swift";
requirement = { requirement = {
kind = exactVersion; kind = exactVersion;
version = "1.0.69-alpha"; version = "1.0.71-alpha";
}; };
}; };
96495DD8554E2F39D3954354 /* XCRemoteSwiftPackageReference "posthog-ios" */ = { 96495DD8554E2F39D3954354 /* XCRemoteSwiftPackageReference "posthog-ios" */ = {
@@ -102,8 +102,8 @@
"kind" : "remoteSourceControl", "kind" : "remoteSourceControl",
"location" : "https://github.com/matrix-org/matrix-rust-components-swift", "location" : "https://github.com/matrix-org/matrix-rust-components-swift",
"state" : { "state" : {
"revision" : "05f956572eae1491ea3a096bec24d51e90975bc9", "revision" : "3cd19bf79bd89b71477642a1d2172f3ee48b44ef",
"version" : "1.0.69-alpha" "version" : "1.0.71-alpha"
} }
}, },
{ {
@@ -172,7 +172,7 @@
{ {
"identity" : "swift-snapshot-testing", "identity" : "swift-snapshot-testing",
"kind" : "remoteSourceControl", "kind" : "remoteSourceControl",
"location" : "https://github.com/pointfreeco/swift-snapshot-testing", "location" : "https://github.com/pointfreeco/swift-snapshot-testing.git",
"state" : { "state" : {
"revision" : "cef5b3f6f11781dd4591bdd1dd0a3d22bd609334", "revision" : "cef5b3f6f11781dd4591bdd1dd0a3d22bd609334",
"version" : "1.11.0" "version" : "1.11.0"
@@ -466,8 +466,7 @@ class ClientProxy: ClientProxyProtocol {
.timelineLimit(limit: UInt32(SlidingSyncConstants.initialTimelineLimit)) // Starts off with zero to quickly load rooms, then goes to 1 while scrolling to quickly load last messages and 20 when the scrolling stops to load room history .timelineLimit(limit: UInt32(SlidingSyncConstants.initialTimelineLimit)) // Starts off with zero to quickly load rooms, then goes to 1 while scrolling to quickly load last messages and 20 when the scrolling stops to load room history
.requiredState(requiredState: slidingSyncRequiredState) .requiredState(requiredState: slidingSyncRequiredState)
.filters(filters: slidingSyncFilters) .filters(filters: slidingSyncFilters)
.syncModeSelective() .syncModeSelective(selectiveModeBuilder: .init().addRange(start: 0, endInclusive: 20))
.addRange(from: 0, toIncluded: 20)
.onceBuilt(callback: visibleRoomsListProxy) .onceBuilt(callback: visibleRoomsListProxy)
self.visibleRoomsListBuilder = visibleRoomsListBuilder self.visibleRoomsListBuilder = visibleRoomsListBuilder
@@ -105,7 +105,7 @@ class SlidingSyncListProxy: SlidingSyncListOnceBuilt {
do { do {
if let range { if let range {
MXLog.info("Setting '\(name)' list range to \(range)") MXLog.info("Setting '\(name)' list range to \(range)")
try slidingSyncList?.setRange(start: UInt32(range.lowerBound), end: UInt32(range.upperBound)) try slidingSyncList?.setSyncMode(builder: .init().addRange(start: UInt32(range.lowerBound), endInclusive: UInt32(range.upperBound)))
} }
if let timelineLimit { if let timelineLimit {
+1 -1
View File
@@ -43,7 +43,7 @@ include:
packages: packages:
MatrixRustSDK: MatrixRustSDK:
url: https://github.com/matrix-org/matrix-rust-components-swift url: https://github.com/matrix-org/matrix-rust-components-swift
exactVersion: 1.0.69-alpha exactVersion: 1.0.71-alpha
# path: ../matrix-rust-sdk # path: ../matrix-rust-sdk
DesignKit: DesignKit:
path: DesignKit path: DesignKit