diff --git a/Components/SDKMocks/Sources/Generated/SDKGeneratedMocks.swift b/Components/SDKMocks/Sources/Generated/SDKGeneratedMocks.swift index 3b79ce32c..e2ae1bb8e 100644 --- a/Components/SDKMocks/Sources/Generated/SDKGeneratedMocks.swift +++ b/Components/SDKMocks/Sources/Generated/SDKGeneratedMocks.swift @@ -1,4 +1,4 @@ -// Generated using Sourcery 2.3.0 — https://github.com/krzysztofzablocki/Sourcery +// Generated using Sourcery 2.4.1 — https://github.com/krzysztofzablocki/Sourcery // DO NOT EDIT // swiftlint:disable all @@ -2656,6 +2656,49 @@ open class ClientSDKMock: MatrixRustSDK.Client, @unchecked Sendable { } } + //MARK: - observeTotalUnreadNotifications + + private let observeTotalUnreadNotificationsListenerMinIntervalCallsCountLock = NSLock() + private var observeTotalUnreadNotificationsListenerMinIntervalUnderlyingCallsCount = 0 + open var observeTotalUnreadNotificationsListenerMinIntervalCallsCount: Int { + get { observeTotalUnreadNotificationsListenerMinIntervalCallsCountLock.withLock { observeTotalUnreadNotificationsListenerMinIntervalUnderlyingCallsCount } } + set { observeTotalUnreadNotificationsListenerMinIntervalCallsCountLock.withLock { observeTotalUnreadNotificationsListenerMinIntervalUnderlyingCallsCount = newValue } } + } + open var observeTotalUnreadNotificationsListenerMinIntervalCalled: Bool { + return observeTotalUnreadNotificationsListenerMinIntervalCallsCount > 0 + } + private let observeTotalUnreadNotificationsListenerMinIntervalReceivedArgumentsLock = NSLock() + private var observeTotalUnreadNotificationsListenerMinIntervalUnderlyingReceivedArguments: (listener: TotalUnreadNotificationsListener, minInterval: TimeInterval)? + open var observeTotalUnreadNotificationsListenerMinIntervalReceivedArguments: (listener: TotalUnreadNotificationsListener, minInterval: TimeInterval)? { + get { observeTotalUnreadNotificationsListenerMinIntervalReceivedArgumentsLock.withLock { observeTotalUnreadNotificationsListenerMinIntervalUnderlyingReceivedArguments } } + set { observeTotalUnreadNotificationsListenerMinIntervalReceivedArgumentsLock.withLock { observeTotalUnreadNotificationsListenerMinIntervalUnderlyingReceivedArguments = newValue } } + } + private let observeTotalUnreadNotificationsListenerMinIntervalReceivedInvocationsLock = NSLock() + private var observeTotalUnreadNotificationsListenerMinIntervalUnderlyingReceivedInvocations: [(listener: TotalUnreadNotificationsListener, minInterval: TimeInterval)] = [] + open var observeTotalUnreadNotificationsListenerMinIntervalReceivedInvocations: [(listener: TotalUnreadNotificationsListener, minInterval: TimeInterval)] { + get { observeTotalUnreadNotificationsListenerMinIntervalReceivedInvocationsLock.withLock { observeTotalUnreadNotificationsListenerMinIntervalUnderlyingReceivedInvocations } } + set { observeTotalUnreadNotificationsListenerMinIntervalReceivedInvocationsLock.withLock { observeTotalUnreadNotificationsListenerMinIntervalUnderlyingReceivedInvocations = newValue } } + } + + private let observeTotalUnreadNotificationsListenerMinIntervalReturnValueLock = NSLock() + open var observeTotalUnreadNotificationsListenerMinIntervalUnderlyingReturnValue: TaskHandle! + open var observeTotalUnreadNotificationsListenerMinIntervalReturnValue: TaskHandle! { + get { observeTotalUnreadNotificationsListenerMinIntervalReturnValueLock.withLock { observeTotalUnreadNotificationsListenerMinIntervalUnderlyingReturnValue } } + set { observeTotalUnreadNotificationsListenerMinIntervalReturnValueLock.withLock { observeTotalUnreadNotificationsListenerMinIntervalUnderlyingReturnValue = newValue } } + } + open var observeTotalUnreadNotificationsListenerMinIntervalClosure: ((TotalUnreadNotificationsListener, TimeInterval) -> TaskHandle)? + + open override func observeTotalUnreadNotifications(listener: TotalUnreadNotificationsListener, minInterval: TimeInterval) -> TaskHandle { + observeTotalUnreadNotificationsListenerMinIntervalCallsCountLock.withLock { observeTotalUnreadNotificationsListenerMinIntervalUnderlyingCallsCount += 1 } + observeTotalUnreadNotificationsListenerMinIntervalReceivedArguments = (listener: listener, minInterval: minInterval) + observeTotalUnreadNotificationsListenerMinIntervalReceivedInvocationsLock.withLock { observeTotalUnreadNotificationsListenerMinIntervalUnderlyingReceivedInvocations.append((listener: listener, minInterval: minInterval)) } + if let observeTotalUnreadNotificationsListenerMinIntervalClosure = observeTotalUnreadNotificationsListenerMinIntervalClosure { + return observeTotalUnreadNotificationsListenerMinIntervalClosure(listener, minInterval) + } else { + return observeTotalUnreadNotificationsListenerMinIntervalReturnValue + } + } + //MARK: - optimizeStores open var optimizeStoresThrowableError: Error? diff --git a/ElementX.xcodeproj/project.pbxproj b/ElementX.xcodeproj/project.pbxproj index 8f774fdd6..cc77aee51 100644 --- a/ElementX.xcodeproj/project.pbxproj +++ b/ElementX.xcodeproj/project.pbxproj @@ -11201,7 +11201,7 @@ repositoryURL = "https://github.com/element-hq/matrix-rust-components-swift"; requirement = { kind = exactVersion; - version = 26.10.27; + version = "26.10.30-2"; }; }; 701C7BEF8F70F7A83E852DCC /* XCRemoteSwiftPackageReference "GZIP" */ = { @@ -11233,7 +11233,7 @@ repositoryURL = "https://github.com/element-hq/element-call-swift"; requirement = { kind = exactVersion; - version = "0.28.1-rc.1"; + version = "0.28.1-rc.2"; }; }; 821C67C9A7F8CC3FD41B28B4 /* XCRemoteSwiftPackageReference "emojibase-bindings" */ = { diff --git a/ElementX.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/ElementX.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index a291c0cd5..c9e6ad265 100644 --- a/ElementX.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/ElementX.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -1,5 +1,5 @@ { - "originHash" : "1964864908944417b4a35a1c63d86d9c5801ed33b9ccea55fb0e6aa645bdc917", + "originHash" : "f99db7401bc7af2ca673ef115aba55ebf7c2a2853096963e2b6b0899b7b70542", "pins" : [ { "identity" : "compound-design-tokens", @@ -69,8 +69,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/element-hq/element-call-swift", "state" : { - "revision" : "df2326dffddaa5e6b23cb158a8d899dd1d0e8222", - "version" : "0.28.1-rc.1" + "revision" : "c1bf64172254a3059bb4ec5225c6eb829bf698a3", + "version" : "0.28.1-rc.2" } }, { @@ -176,8 +176,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/element-hq/matrix-rust-components-swift", "state" : { - "revision" : "aaed1190a928db9085e8c2e58a7b1c109128b922", - "version" : "26.10.27" + "revision" : "f5fa5ad0faed200af6dbcb2ddc61dd115e82ba06", + "version" : "26.10.30-2" } }, { diff --git a/ElementX/Sources/Mocks/SDK/EventTimelineItem.swift b/ElementX/Sources/Mocks/SDK/EventTimelineItem.swift index 0579ee5bb..e4f01991d 100644 --- a/ElementX/Sources/Mocks/SDK/EventTimelineItem.swift +++ b/ElementX/Sources/Mocks/SDK/EventTimelineItem.swift @@ -47,6 +47,7 @@ nonisolated extension EventTimelineItem { localSendState: nil, editSendState: nil, redactionSendState: nil, + redactionReason: nil, localCreatedAt: nil, readReceipts: [:], origin: nil, diff --git a/ElementX/Sources/Services/NativeCall/Matrix/SDKMappings.swift b/ElementX/Sources/Services/NativeCall/Matrix/SDKMappings.swift index 4f1a0080f..c9df37583 100644 --- a/ElementX/Sources/Services/NativeCall/Matrix/SDKMappings.swift +++ b/ElementX/Sources/Services/NativeCall/Matrix/SDKMappings.swift @@ -123,7 +123,7 @@ nonisolated enum SDKMappings { static func transportsJSON(_ transports: [RtcTransport]) -> String { let objects: [[String: Any]] = transports.map { transport in switch transport { - case .liveKit(let serviceURL): + case .liveKit(_, let serviceURL): return ["type": "livekit", "livekit_service_url": serviceURL] case .custom(let type, let data): var fields = jsonObject(data) ?? [:] diff --git a/UnitTests/Sources/SDKMappingsTests.swift b/UnitTests/Sources/SDKMappingsTests.swift index 208f8e5f4..d86336cb4 100644 --- a/UnitTests/Sources/SDKMappingsTests.swift +++ b/UnitTests/Sources/SDKMappingsTests.swift @@ -141,7 +141,7 @@ struct SDKMappingsTests { @Test func transportsAreRebuiltAsTheMSC4143Array() throws { - let json = SDKMappings.transportsJSON([.liveKit(serviceUrl: "https://sfu.example.org"), + let json = SDKMappings.transportsJSON([.liveKit(url: nil, serviceUrl: "https://sfu.example.org"), .custom(transportType: "other", data: #"{"url":"https://other.example.org"}"#)]) let array = try #require(JSONSerialization.jsonObject(with: Data(json.utf8)) as? [[String: String]]) diff --git a/project.yml b/project.yml index 22d54fcf3..c0b720885 100644 --- a/project.yml +++ b/project.yml @@ -75,7 +75,7 @@ packages: # Element/Matrix dependencies MatrixRustSDK: url: https://github.com/element-hq/matrix-rust-components-swift - exactVersion: 26.10.27 + exactVersion: 26.10.30-2 # path: ../matrix-rust-sdk Compound: path: compound-ios @@ -87,7 +87,7 @@ packages: # path: ../matrix-analytics-events EmbeddedElementCall: url: https://github.com/element-hq/element-call-swift # WebView implementation - exactVersion: 0.28.1-rc.1 + exactVersion: 0.28.1-rc.2 ElementCall: url: https://github.com/element-hq/element-call-ios # Native implementation exactVersion: 0.1.0-rc.13