diff --git a/ElementX.xcodeproj/project.pbxproj b/ElementX.xcodeproj/project.pbxproj index 07f7c2982..06f305a92 100644 --- a/ElementX.xcodeproj/project.pbxproj +++ b/ElementX.xcodeproj/project.pbxproj @@ -5004,7 +5004,7 @@ repositoryURL = "https://github.com/matrix-org/matrix-rust-components-swift"; requirement = { kind = exactVersion; - version = "1.0.80-alpha"; + version = "1.0.81-alpha"; }; }; 96495DD8554E2F39D3954354 /* XCRemoteSwiftPackageReference "posthog-ios" */ = { diff --git a/ElementX.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/ElementX.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index 754d915d9..301dd429e 100644 --- a/ElementX.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/ElementX.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -111,8 +111,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/matrix-org/matrix-rust-components-swift", "state" : { - "revision" : "d34b870ed9e954b446a8f6db6afa7fa9d8f6c06a", - "version" : "1.0.80-alpha" + "revision" : "eb26d0b26995a36df31b3bd965088ccfbe612779", + "version" : "1.0.81-alpha" } }, { diff --git a/ElementX/Sources/Generated/Assets.swift b/ElementX/Sources/Generated/Assets.swift index 357aa5137..e0a31cfbc 100644 --- a/ElementX/Sources/Generated/Assets.swift +++ b/ElementX/Sources/Generated/Assets.swift @@ -40,8 +40,6 @@ internal enum Asset { internal static let closeCircle = ImageAsset(name: "Images/close_circle") internal static let timelineComposerSendMessage = ImageAsset(name: "Images/timelineComposerSendMessage") } - internal static let launchLogo = ImageAsset(name: "LaunchLogo") - internal static let onboardingBackground = ImageAsset(name: "OnboardingBackground") } // swiftlint:enable identifier_name line_length nesting type_body_length type_name diff --git a/ElementX/Sources/Mocks/Generated/SDKGeneratedMocks.swift b/ElementX/Sources/Mocks/Generated/SDKGeneratedMocks.swift index aea507468..c08939e3b 100644 --- a/ElementX/Sources/Mocks/Generated/SDKGeneratedMocks.swift +++ b/ElementX/Sources/Mocks/Generated/SDKGeneratedMocks.swift @@ -384,29 +384,54 @@ class SDKClientMock: SDKClientProtocol { logoutCallsCount += 1 try logoutClosure?() } - //MARK: - `notificationSlidingSync` + //MARK: - `mainEncryptionSync` - public var notificationSlidingSyncIdListenerThrowableError: Error? - public var notificationSlidingSyncIdListenerCallsCount = 0 - public var notificationSlidingSyncIdListenerCalled: Bool { - return notificationSlidingSyncIdListenerCallsCount > 0 + public var mainEncryptionSyncIdListenerThrowableError: Error? + public var mainEncryptionSyncIdListenerCallsCount = 0 + public var mainEncryptionSyncIdListenerCalled: Bool { + return mainEncryptionSyncIdListenerCallsCount > 0 } - public var notificationSlidingSyncIdListenerReceivedArguments: (`id`: String, `listener`: NotificationSyncListener)? - public var notificationSlidingSyncIdListenerReceivedInvocations: [(`id`: String, `listener`: NotificationSyncListener)] = [] - public var notificationSlidingSyncIdListenerReturnValue: NotificationSync! - public var notificationSlidingSyncIdListenerClosure: ((String, NotificationSyncListener) throws -> NotificationSync)? + public var mainEncryptionSyncIdListenerReceivedArguments: (`id`: String, `listener`: EncryptionSyncListener)? + public var mainEncryptionSyncIdListenerReceivedInvocations: [(`id`: String, `listener`: EncryptionSyncListener)] = [] + public var mainEncryptionSyncIdListenerReturnValue: EncryptionSync! + public var mainEncryptionSyncIdListenerClosure: ((String, EncryptionSyncListener) throws -> EncryptionSync)? - public func `notificationSlidingSync`(`id`: String, `listener`: NotificationSyncListener) throws -> NotificationSync { - if let error = notificationSlidingSyncIdListenerThrowableError { + public func `mainEncryptionSync`(`id`: String, `listener`: EncryptionSyncListener) throws -> EncryptionSync { + if let error = mainEncryptionSyncIdListenerThrowableError { throw error } - notificationSlidingSyncIdListenerCallsCount += 1 - notificationSlidingSyncIdListenerReceivedArguments = (id: id, listener: listener) - notificationSlidingSyncIdListenerReceivedInvocations.append((id: id, listener: listener)) - if let notificationSlidingSyncIdListenerClosure = notificationSlidingSyncIdListenerClosure { - return try notificationSlidingSyncIdListenerClosure(`id`, `listener`) + mainEncryptionSyncIdListenerCallsCount += 1 + mainEncryptionSyncIdListenerReceivedArguments = (id: id, listener: listener) + mainEncryptionSyncIdListenerReceivedInvocations.append((id: id, listener: listener)) + if let mainEncryptionSyncIdListenerClosure = mainEncryptionSyncIdListenerClosure { + return try mainEncryptionSyncIdListenerClosure(`id`, `listener`) } else { - return notificationSlidingSyncIdListenerReturnValue + return mainEncryptionSyncIdListenerReturnValue + } + } + //MARK: - `notificationEncryptionSync` + + public var notificationEncryptionSyncIdListenerNumItersThrowableError: Error? + public var notificationEncryptionSyncIdListenerNumItersCallsCount = 0 + public var notificationEncryptionSyncIdListenerNumItersCalled: Bool { + return notificationEncryptionSyncIdListenerNumItersCallsCount > 0 + } + public var notificationEncryptionSyncIdListenerNumItersReceivedArguments: (`id`: String, `listener`: EncryptionSyncListener, `numIters`: UInt8)? + public var notificationEncryptionSyncIdListenerNumItersReceivedInvocations: [(`id`: String, `listener`: EncryptionSyncListener, `numIters`: UInt8)] = [] + public var notificationEncryptionSyncIdListenerNumItersReturnValue: EncryptionSync! + public var notificationEncryptionSyncIdListenerNumItersClosure: ((String, EncryptionSyncListener, UInt8) throws -> EncryptionSync)? + + public func `notificationEncryptionSync`(`id`: String, `listener`: EncryptionSyncListener, `numIters`: UInt8) throws -> EncryptionSync { + if let error = notificationEncryptionSyncIdListenerNumItersThrowableError { + throw error + } + notificationEncryptionSyncIdListenerNumItersCallsCount += 1 + notificationEncryptionSyncIdListenerNumItersReceivedArguments = (id: id, listener: listener, numIters: numIters) + notificationEncryptionSyncIdListenerNumItersReceivedInvocations.append((id: id, listener: listener, numIters: numIters)) + if let notificationEncryptionSyncIdListenerNumItersClosure = notificationEncryptionSyncIdListenerNumItersClosure { + return try notificationEncryptionSyncIdListenerNumItersClosure(`id`, `listener`, `numIters`) + } else { + return notificationEncryptionSyncIdListenerNumItersReturnValue } } //MARK: - `restoreSession` @@ -450,6 +475,27 @@ class SDKClientMock: SDKClientProtocol { return roomListReturnValue } } + //MARK: - `roomListWithEncryption` + + public var roomListWithEncryptionThrowableError: Error? + public var roomListWithEncryptionCallsCount = 0 + public var roomListWithEncryptionCalled: Bool { + return roomListWithEncryptionCallsCount > 0 + } + public var roomListWithEncryptionReturnValue: RoomList! + public var roomListWithEncryptionClosure: (() throws -> RoomList)? + + public func `roomListWithEncryption`() throws -> RoomList { + if let error = roomListWithEncryptionThrowableError { + throw error + } + roomListWithEncryptionCallsCount += 1 + if let roomListWithEncryptionClosure = roomListWithEncryptionClosure { + return try roomListWithEncryptionClosure() + } else { + return roomListWithEncryptionReturnValue + } + } //MARK: - `rooms` public var roomsCallsCount = 0 diff --git a/UnitTests/Sources/RoomScreenViewModelTests.swift b/UnitTests/Sources/RoomScreenViewModelTests.swift index 8635f8264..181a3812a 100644 --- a/UnitTests/Sources/RoomScreenViewModelTests.swift +++ b/UnitTests/Sources/RoomScreenViewModelTests.swift @@ -185,7 +185,7 @@ class RoomScreenViewModelTests: XCTestCase { // Test viewModel.context.send(viewAction: .tappedOnUser(userID: "bob")) await Task.yield() - XCTAssertFalse(userIndicatorControllerMock.submitIndicatorDelayCalled) + XCTAssert(userIndicatorControllerMock.submitIndicatorDelayCallsCount == 1) XCTAssert(roomProxyMock.getMemberUserIDCallsCount == 1) XCTAssertEqual(roomProxyMock.getMemberUserIDReceivedUserID, "bob") } diff --git a/project.yml b/project.yml index 71548cc8c..d2a369623 100644 --- a/project.yml +++ b/project.yml @@ -44,7 +44,7 @@ include: packages: MatrixRustSDK: url: https://github.com/matrix-org/matrix-rust-components-swift - exactVersion: 1.0.80-alpha + exactVersion: 1.0.81-alpha # path: ../matrix-rust-sdk DesignKit: path: DesignKit