Update the SDK and handle the API breaks.

This commit is contained in:
Doug
2026-01-05 15:33:51 +00:00
committed by Doug
parent e9b728f1fe
commit 5d57b21222
9 changed files with 15 additions and 16 deletions

View File

@@ -9598,7 +9598,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.12.17; version = 25.12.19;
}; };
}; };
701C7BEF8F70F7A83E852DCC /* XCRemoteSwiftPackageReference "GZIP" */ = { 701C7BEF8F70F7A83E852DCC /* XCRemoteSwiftPackageReference "GZIP" */ = {

View File

@@ -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" : "22e7419cc1dd4fe9cdcc9e596e86b805ca1be809", "revision" : "bc1acbc8ee7e8271465a724e3b3f2339cd12d20b",
"version" : "25.12.17" "version" : "25.12.19"
} }
}, },
{ {

View File

@@ -16,7 +16,7 @@ struct NotificationItemProxyMockConfiguration {
let messageLikeContent = MessageLikeEventContent.roomMessage(messageType: messageType, inReplyToEventId: nil) let messageLikeContent = MessageLikeEventContent.roomMessage(messageType: messageType, inReplyToEventId: nil)
let event = TimelineEventSDKMock() let event = TimelineEventSDKMock()
event.eventIdUnderlyingReturnValue = UUID().uuidString event.eventIdUnderlyingReturnValue = UUID().uuidString
event.eventTypeReturnValue = TimelineEventType.messageLike(content: messageLikeContent) event.contentReturnValue = .messageLike(content: messageLikeContent)
return .timeline(event: event) return .timeline(event: event)
}() }()

View File

@@ -172,7 +172,7 @@ class ClientProxy: ClientProxyProtocol {
secureBackupController = SecureBackupController(encryption: client.encryption()) secureBackupController = SecureBackupController(encryption: client.encryption())
spaceService = SpaceServiceProxy(spaceService: client.spaceService()) spaceService = await SpaceServiceProxy(spaceService: client.spaceService())
let configuredAppService = try await ClientProxyServices(client: client, let configuredAppService = try await ClientProxyServices(client: client,
actionsSubject: actionsSubject, actionsSubject: actionsSubject,

View File

@@ -26,7 +26,7 @@ class SpaceServiceProxy: SpaceServiceProxyProtocol {
} }
private func setupSubscriptions() async { private func setupSubscriptions() async {
joinedSpacesHandle = await spaceService.subscribeToJoinedSpaces(listener: SDKListener { [weak self] updates in joinedSpacesHandle = await spaceService.subscribeToTopLevelJoinedSpaces(listener: SDKListener { [weak self] updates in
self?.handleUpdates(updates) self?.handleUpdates(updates)
}) })
} }

View File

@@ -59,8 +59,7 @@ struct NotificationContentBuilder {
notificationItem: notificationItem, notificationItem: notificationItem,
mediaProvider: mediaProvider) mediaProvider: mediaProvider)
case .timeline(let event): case .timeline(let event):
guard let eventType = try? event.eventType(), guard case let .messageLike(messageContent) = try? event.content() else {
case let .messageLike(content) = eventType else {
processEmpty(&notificationContent) processEmpty(&notificationContent)
return return
} }
@@ -69,7 +68,7 @@ struct NotificationContentBuilder {
notificationItem: notificationItem, notificationItem: notificationItem,
mediaProvider: mediaProvider) mediaProvider: mediaProvider)
switch content { switch messageContent {
case .roomMessage(let messageType, _): case .roomMessage(let messageType, _):
await processRoomMessage(notificationContent: &notificationContent, await processRoomMessage(notificationContent: &notificationContent,
notificationItem: notificationItem, notificationItem: notificationItem,

View File

@@ -98,9 +98,9 @@ class NotificationHandler {
return .shouldDisplay return .shouldDisplay
} }
switch try? event.eventType() { switch try? event.content() {
case .messageLike(let content): case .messageLike(let messageContent):
switch content { switch messageContent {
case .poll, case .poll,
.roomEncrypted, .roomEncrypted,
.sticker: .sticker:

View File

@@ -1,13 +1,13 @@
{ {
"originHash" : "43d8d4409954f06d1f1b8ea37d305f2db6b1e8bd1b8a0e108e9bae075d7a601c", "originHash" : "ef4c8dd879ab71e7b86c9acb2ca8553c28ad37193014cec9199f0c0f5fd14b41",
"pins" : [ "pins" : [
{ {
"identity" : "swift-argument-parser", "identity" : "swift-argument-parser",
"kind" : "remoteSourceControl", "kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-argument-parser", "location" : "https://github.com/apple/swift-argument-parser",
"state" : { "state" : {
"revision" : "cdd0ef3755280949551dc26dee5de9ddeda89f54", "revision" : "c5d11a805e765f52ba34ec7284bd4fcd6ba68615",
"version" : "1.6.2" "version" : "1.7.0"
} }
}, },
{ {

View File

@@ -71,7 +71,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.12.17 exactVersion: 25.12.19
# path: ../matrix-rust-sdk # path: ../matrix-rust-sdk
Compound: Compound:
path: compound-ios path: compound-ios