Bump the SDK to v25.06.25-2 which enables (re)storing the sliding sync position in between app runs.

This commit is contained in:
Stefan Ceriu
2025-06-25 16:39:59 +03:00
committed by Stefan Ceriu
parent 46f49af930
commit 11c7d07e76
6 changed files with 31 additions and 24 deletions
+1 -1
View File
@@ -8748,7 +8748,7 @@
repositoryURL = "https://github.com/element-hq/matrix-rust-components-swift"; repositoryURL = "https://github.com/element-hq/matrix-rust-components-swift";
requirement = { requirement = {
kind = exactVersion; kind = exactVersion;
version = 25.06.25; version = "25.06.25-2";
}; };
}; };
701C7BEF8F70F7A83E852DCC /* XCRemoteSwiftPackageReference "GZIP" */ = { 701C7BEF8F70F7A83E852DCC /* XCRemoteSwiftPackageReference "GZIP" */ = {
@@ -158,8 +158,8 @@
"kind" : "remoteSourceControl", "kind" : "remoteSourceControl",
"location" : "https://github.com/element-hq/matrix-rust-components-swift", "location" : "https://github.com/element-hq/matrix-rust-components-swift",
"state" : { "state" : {
"revision" : "28083837b3c743eb76b23c12c6ef5873668190e6", "revision" : "302397835194e0bb73de876dc2ef2d3e1a7c7740",
"version" : "25.6.25" "version" : "25.6.25-2"
} }
}, },
{ {
@@ -554,16 +554,16 @@ open class ClientSDKMock: MatrixRustSDK.Client, @unchecked Sendable {
//MARK: - clearCaches //MARK: - clearCaches
open var clearCachesThrowableError: Error? open var clearCachesSyncServiceThrowableError: Error?
var clearCachesUnderlyingCallsCount = 0 var clearCachesSyncServiceUnderlyingCallsCount = 0
open var clearCachesCallsCount: Int { open var clearCachesSyncServiceCallsCount: Int {
get { get {
if Thread.isMainThread { if Thread.isMainThread {
return clearCachesUnderlyingCallsCount return clearCachesSyncServiceUnderlyingCallsCount
} else { } else {
var returnValue: Int? = nil var returnValue: Int? = nil
DispatchQueue.main.sync { DispatchQueue.main.sync {
returnValue = clearCachesUnderlyingCallsCount returnValue = clearCachesSyncServiceUnderlyingCallsCount
} }
return returnValue! return returnValue!
@@ -571,25 +571,31 @@ open class ClientSDKMock: MatrixRustSDK.Client, @unchecked Sendable {
} }
set { set {
if Thread.isMainThread { if Thread.isMainThread {
clearCachesUnderlyingCallsCount = newValue clearCachesSyncServiceUnderlyingCallsCount = newValue
} else { } else {
DispatchQueue.main.sync { DispatchQueue.main.sync {
clearCachesUnderlyingCallsCount = newValue clearCachesSyncServiceUnderlyingCallsCount = newValue
} }
} }
} }
} }
open var clearCachesCalled: Bool { open var clearCachesSyncServiceCalled: Bool {
return clearCachesCallsCount > 0 return clearCachesSyncServiceCallsCount > 0
} }
open var clearCachesClosure: (() async throws -> Void)? open var clearCachesSyncServiceReceivedSyncService: SyncService?
open var clearCachesSyncServiceReceivedInvocations: [SyncService?] = []
open var clearCachesSyncServiceClosure: ((SyncService?) async throws -> Void)?
open override func clearCaches() async throws { open override func clearCaches(syncService: SyncService?) async throws {
if let error = clearCachesThrowableError { if let error = clearCachesSyncServiceThrowableError {
throw error throw error
} }
clearCachesCallsCount += 1 clearCachesSyncServiceCallsCount += 1
try await clearCachesClosure?() clearCachesSyncServiceReceivedSyncService = syncService
DispatchQueue.main.async {
self.clearCachesSyncServiceReceivedInvocations.append(syncService)
}
try await clearCachesSyncServiceClosure?(syncService)
} }
//MARK: - createRoom //MARK: - createRoom
@@ -13199,13 +13205,13 @@ open class RoomSDKMock: MatrixRustSDK.Room, @unchecked Sendable {
return isPublicCallsCount > 0 return isPublicCallsCount > 0
} }
var isPublicUnderlyingReturnValue: Bool! var isPublicUnderlyingReturnValue: Bool?
open var isPublicReturnValue: Bool! { open var isPublicReturnValue: Bool? {
get { get {
if Thread.isMainThread { if Thread.isMainThread {
return isPublicUnderlyingReturnValue return isPublicUnderlyingReturnValue
} else { } else {
var returnValue: Bool? = nil var returnValue: Bool?? = nil
DispatchQueue.main.sync { DispatchQueue.main.sync {
returnValue = isPublicUnderlyingReturnValue returnValue = isPublicUnderlyingReturnValue
} }
@@ -13223,9 +13229,9 @@ open class RoomSDKMock: MatrixRustSDK.Room, @unchecked Sendable {
} }
} }
} }
open var isPublicClosure: (() -> Bool)? open var isPublicClosure: (() -> Bool?)?
open override func isPublic() -> Bool { open override func isPublic() -> Bool? {
isPublicCallsCount += 1 isPublicCallsCount += 1
if let isPublicClosure = isPublicClosure { if let isPublicClosure = isPublicClosure {
return isPublicClosure() return isPublicClosure()
@@ -752,7 +752,7 @@ class ClientProxy: ClientProxyProtocol {
func clearCaches() async -> Result<Void, ClientProxyError> { func clearCaches() async -> Result<Void, ClientProxyError> {
do { do {
return try await .success(client.clearCaches()) return try await .success(client.clearCaches(syncService: syncService))
} catch { } catch {
MXLog.error("Failed clearing client caches with error: \(error)") MXLog.error("Failed clearing client caches with error: \(error)")
return .failure(.sdkError(error)) return .failure(.sdkError(error))
@@ -82,6 +82,7 @@ class ElementCallWidgetDriver: WidgetCapabilitiesProvider, ElementCallWidgetDriv
widgetSettings = try newVirtualElementCallWidget(props: .init(elementCallUrl: baseURL.absoluteString, widgetSettings = try newVirtualElementCallWidget(props: .init(elementCallUrl: baseURL.absoluteString,
widgetId: widgetID, widgetId: widgetID,
parentUrl: nil, parentUrl: nil,
header: .appBar,
hideHeader: nil, hideHeader: nil,
preload: nil, preload: nil,
fontScale: nil, fontScale: nil,
+1 -1
View File
@@ -65,7 +65,7 @@ packages:
# Element/Matrix dependencies # Element/Matrix dependencies
MatrixRustSDK: MatrixRustSDK:
url: https://github.com/element-hq/matrix-rust-components-swift url: https://github.com/element-hq/matrix-rust-components-swift
exactVersion: 25.06.25 exactVersion: 25.06.25-2
# path: ../matrix-rust-sdk # path: ../matrix-rust-sdk
Compound: Compound:
url: https://github.com/element-hq/compound-ios url: https://github.com/element-hq/compound-ios