Skip to content

Commit a1f3b32

Browse files
committed
Update the SDK.
1 parent a21c1b8 commit a1f3b32

File tree

6 files changed

+218
-5
lines changed

6 files changed

+218
-5
lines changed

ElementX.xcodeproj/project.pbxproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9347,7 +9347,7 @@
93479347
repositoryURL = "https://github.com/element-hq/matrix-rust-components-swift";
93489348
requirement = {
93499349
kind = exactVersion;
9350-
version = "25.09.19-2";
9350+
version = 25.09.26;
93519351
};
93529352
};
93539353
701C7BEF8F70F7A83E852DCC /* XCRemoteSwiftPackageReference "GZIP" */ = {

ElementX.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ElementX/Sources/Mocks/Generated/SDKGeneratedMocks.swift

Lines changed: 210 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Generated using Sourcery 2.2.7 — https://github.com/krzysztofzablocki/Sourcery
1+
// Generated using Sourcery 2.3.0 — https://github.com/krzysztofzablocki/Sourcery
22
// DO NOT EDIT
33

44
// swiftlint:disable all
@@ -8149,6 +8149,75 @@ open class EncryptionSDKMock: MatrixRustSDK.Encryption, @unchecked Sendable {
81498149
}
81508150
}
81518151

8152+
//MARK: - hasDevicesToVerifyAgainst
8153+
8154+
open var hasDevicesToVerifyAgainstThrowableError: Error?
8155+
var hasDevicesToVerifyAgainstUnderlyingCallsCount = 0
8156+
open var hasDevicesToVerifyAgainstCallsCount: Int {
8157+
get {
8158+
if Thread.isMainThread {
8159+
return hasDevicesToVerifyAgainstUnderlyingCallsCount
8160+
} else {
8161+
var returnValue: Int? = nil
8162+
DispatchQueue.main.sync {
8163+
returnValue = hasDevicesToVerifyAgainstUnderlyingCallsCount
8164+
}
8165+
8166+
return returnValue!
8167+
}
8168+
}
8169+
set {
8170+
if Thread.isMainThread {
8171+
hasDevicesToVerifyAgainstUnderlyingCallsCount = newValue
8172+
} else {
8173+
DispatchQueue.main.sync {
8174+
hasDevicesToVerifyAgainstUnderlyingCallsCount = newValue
8175+
}
8176+
}
8177+
}
8178+
}
8179+
open var hasDevicesToVerifyAgainstCalled: Bool {
8180+
return hasDevicesToVerifyAgainstCallsCount > 0
8181+
}
8182+
8183+
var hasDevicesToVerifyAgainstUnderlyingReturnValue: Bool!
8184+
open var hasDevicesToVerifyAgainstReturnValue: Bool! {
8185+
get {
8186+
if Thread.isMainThread {
8187+
return hasDevicesToVerifyAgainstUnderlyingReturnValue
8188+
} else {
8189+
var returnValue: Bool? = nil
8190+
DispatchQueue.main.sync {
8191+
returnValue = hasDevicesToVerifyAgainstUnderlyingReturnValue
8192+
}
8193+
8194+
return returnValue!
8195+
}
8196+
}
8197+
set {
8198+
if Thread.isMainThread {
8199+
hasDevicesToVerifyAgainstUnderlyingReturnValue = newValue
8200+
} else {
8201+
DispatchQueue.main.sync {
8202+
hasDevicesToVerifyAgainstUnderlyingReturnValue = newValue
8203+
}
8204+
}
8205+
}
8206+
}
8207+
open var hasDevicesToVerifyAgainstClosure: (() async throws -> Bool)?
8208+
8209+
open override func hasDevicesToVerifyAgainst() async throws -> Bool {
8210+
if let error = hasDevicesToVerifyAgainstThrowableError {
8211+
throw error
8212+
}
8213+
hasDevicesToVerifyAgainstCallsCount += 1
8214+
if let hasDevicesToVerifyAgainstClosure = hasDevicesToVerifyAgainstClosure {
8215+
return try await hasDevicesToVerifyAgainstClosure()
8216+
} else {
8217+
return hasDevicesToVerifyAgainstReturnValue
8218+
}
8219+
}
8220+
81528221
//MARK: - isLastDevice
81538222

81548223
open var isLastDeviceThrowableError: Error?
@@ -14289,6 +14358,81 @@ open class RoomSDKMock: MatrixRustSDK.Room, @unchecked Sendable {
1428914358
}
1429014359
}
1429114360

14361+
//MARK: - loadOrFetchEvent
14362+
14363+
open var loadOrFetchEventEventIdThrowableError: Error?
14364+
var loadOrFetchEventEventIdUnderlyingCallsCount = 0
14365+
open var loadOrFetchEventEventIdCallsCount: Int {
14366+
get {
14367+
if Thread.isMainThread {
14368+
return loadOrFetchEventEventIdUnderlyingCallsCount
14369+
} else {
14370+
var returnValue: Int? = nil
14371+
DispatchQueue.main.sync {
14372+
returnValue = loadOrFetchEventEventIdUnderlyingCallsCount
14373+
}
14374+
14375+
return returnValue!
14376+
}
14377+
}
14378+
set {
14379+
if Thread.isMainThread {
14380+
loadOrFetchEventEventIdUnderlyingCallsCount = newValue
14381+
} else {
14382+
DispatchQueue.main.sync {
14383+
loadOrFetchEventEventIdUnderlyingCallsCount = newValue
14384+
}
14385+
}
14386+
}
14387+
}
14388+
open var loadOrFetchEventEventIdCalled: Bool {
14389+
return loadOrFetchEventEventIdCallsCount > 0
14390+
}
14391+
open var loadOrFetchEventEventIdReceivedEventId: String?
14392+
open var loadOrFetchEventEventIdReceivedInvocations: [String] = []
14393+
14394+
var loadOrFetchEventEventIdUnderlyingReturnValue: TimelineEvent!
14395+
open var loadOrFetchEventEventIdReturnValue: TimelineEvent! {
14396+
get {
14397+
if Thread.isMainThread {
14398+
return loadOrFetchEventEventIdUnderlyingReturnValue
14399+
} else {
14400+
var returnValue: TimelineEvent? = nil
14401+
DispatchQueue.main.sync {
14402+
returnValue = loadOrFetchEventEventIdUnderlyingReturnValue
14403+
}
14404+
14405+
return returnValue!
14406+
}
14407+
}
14408+
set {
14409+
if Thread.isMainThread {
14410+
loadOrFetchEventEventIdUnderlyingReturnValue = newValue
14411+
} else {
14412+
DispatchQueue.main.sync {
14413+
loadOrFetchEventEventIdUnderlyingReturnValue = newValue
14414+
}
14415+
}
14416+
}
14417+
}
14418+
open var loadOrFetchEventEventIdClosure: ((String) async throws -> TimelineEvent)?
14419+
14420+
open override func loadOrFetchEvent(eventId: String) async throws -> TimelineEvent {
14421+
if let error = loadOrFetchEventEventIdThrowableError {
14422+
throw error
14423+
}
14424+
loadOrFetchEventEventIdCallsCount += 1
14425+
loadOrFetchEventEventIdReceivedEventId = eventId
14426+
DispatchQueue.main.async {
14427+
self.loadOrFetchEventEventIdReceivedInvocations.append(eventId)
14428+
}
14429+
if let loadOrFetchEventEventIdClosure = loadOrFetchEventEventIdClosure {
14430+
return try await loadOrFetchEventEventIdClosure(eventId)
14431+
} else {
14432+
return loadOrFetchEventEventIdReturnValue
14433+
}
14434+
}
14435+
1429214436
//MARK: - markAsRead
1429314437

1429414438
open var markAsReadReceiptTypeThrowableError: Error?
@@ -25317,6 +25461,71 @@ open class TimelineEventSDKMock: MatrixRustSDK.TimelineEvent, @unchecked Sendabl
2531725461
}
2531825462
}
2531925463

25464+
//MARK: - threadRootEventId
25465+
25466+
var threadRootEventIdUnderlyingCallsCount = 0
25467+
open var threadRootEventIdCallsCount: Int {
25468+
get {
25469+
if Thread.isMainThread {
25470+
return threadRootEventIdUnderlyingCallsCount
25471+
} else {
25472+
var returnValue: Int? = nil
25473+
DispatchQueue.main.sync {
25474+
returnValue = threadRootEventIdUnderlyingCallsCount
25475+
}
25476+
25477+
return returnValue!
25478+
}
25479+
}
25480+
set {
25481+
if Thread.isMainThread {
25482+
threadRootEventIdUnderlyingCallsCount = newValue
25483+
} else {
25484+
DispatchQueue.main.sync {
25485+
threadRootEventIdUnderlyingCallsCount = newValue
25486+
}
25487+
}
25488+
}
25489+
}
25490+
open var threadRootEventIdCalled: Bool {
25491+
return threadRootEventIdCallsCount > 0
25492+
}
25493+
25494+
var threadRootEventIdUnderlyingReturnValue: String?
25495+
open var threadRootEventIdReturnValue: String? {
25496+
get {
25497+
if Thread.isMainThread {
25498+
return threadRootEventIdUnderlyingReturnValue
25499+
} else {
25500+
var returnValue: String?? = nil
25501+
DispatchQueue.main.sync {
25502+
returnValue = threadRootEventIdUnderlyingReturnValue
25503+
}
25504+
25505+
return returnValue!
25506+
}
25507+
}
25508+
set {
25509+
if Thread.isMainThread {
25510+
threadRootEventIdUnderlyingReturnValue = newValue
25511+
} else {
25512+
DispatchQueue.main.sync {
25513+
threadRootEventIdUnderlyingReturnValue = newValue
25514+
}
25515+
}
25516+
}
25517+
}
25518+
open var threadRootEventIdClosure: (() -> String?)?
25519+
25520+
open override func threadRootEventId() -> String? {
25521+
threadRootEventIdCallsCount += 1
25522+
if let threadRootEventIdClosure = threadRootEventIdClosure {
25523+
return threadRootEventIdClosure()
25524+
} else {
25525+
return threadRootEventIdReturnValue
25526+
}
25527+
}
25528+
2532025529
//MARK: - timestamp
2532125530

2532225531
var timestampUnderlyingCallsCount = 0

ElementX/Sources/Services/Room/RoomSummary/RoomEventStringBuilder.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ struct RoomEventStringBuilder {
5555
default: L10n.commonWaitingForDecryptionKey
5656
}
5757
return prefix(errorMessage, with: displayName, isOutgoing: isOutgoing)
58+
case .other(eventType: let eventType):
59+
return nil // We shouldn't receive these without asking for custom event types.
5860
}
5961
case .failedToParseMessageLike, .failedToParseState:
6062
return prefix(L10n.commonUnsupportedEvent, with: displayName, isOutgoing: isOutgoing)

ElementX/Sources/Services/Timeline/TimelineItems/RoomTimelineItemFactory.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ struct RoomTimelineItemFactory: RoomTimelineItemFactoryProtocol {
4040
return buildRedactedTimelineItem(eventItemProxy, messageLikeContent, isOutgoing)
4141
case .unableToDecrypt(let encryptedMessage):
4242
return buildEncryptedTimelineItem(eventItemProxy, messageLikeContent, encryptedMessage, isOutgoing)
43+
case .other(eventType: let eventType):
44+
return nil // We shouldn't receive these without asking for custom event types.
4345
}
4446
case .failedToParseMessageLike(let eventType, let error):
4547
return buildUnsupportedTimelineItem(eventItemProxy, eventType, error, isOutgoing)

project.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ packages:
6868
# Element/Matrix dependencies
6969
MatrixRustSDK:
7070
url: https://github.com/element-hq/matrix-rust-components-swift
71-
exactVersion: 25.09.19-2
71+
exactVersion: 25.09.26
7272
# path: ../matrix-rust-sdk
7373
Compound:
7474
url: https://github.com/element-hq/compound-ios

0 commit comments

Comments
 (0)