diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 56c60a68d..ff81daa7b 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -9,7 +9,7 @@ on: jobs: integration_tests: name: Integration Tests - runs-on: macos-13 + runs-on: macos-12 concurrency: # Only allow a single run of this workflow on each branch, automatically cancelling older runs. diff --git a/.github/workflows/ui_tests.yml b/.github/workflows/ui_tests.yml index 7709b687d..285acc9bb 100644 --- a/.github/workflows/ui_tests.yml +++ b/.github/workflows/ui_tests.yml @@ -9,7 +9,7 @@ on: jobs: tests: name: Tests - runs-on: macos-13 + runs-on: macos-12 concurrency: # When running on develop, use the sha to allow all runs of this workflow to run concurrently. diff --git a/ElementX/Sources/Application/AppCoordinator.swift b/ElementX/Sources/Application/AppCoordinator.swift index 586fd4662..09c66ea1d 100644 --- a/ElementX/Sources/Application/AppCoordinator.swift +++ b/ElementX/Sources/Application/AppCoordinator.swift @@ -160,7 +160,7 @@ class AppCoordinator: AppCoordinatorProtocol { case (.signingOut, .completedSigningOut(let isSoft), .signedOut): self.presentSplashScreen(isSoftLogout: isSoft) case (.signedIn, .clearCache, .initial): - clearCache() + self.clearCache() default: fatalError("Unknown transition: \(context)") } diff --git a/ElementX/Sources/Mocks/Generated/GeneratedMocks.swift b/ElementX/Sources/Mocks/Generated/GeneratedMocks.swift index d4269126d..7a569799d 100644 --- a/ElementX/Sources/Mocks/Generated/GeneratedMocks.swift +++ b/ElementX/Sources/Mocks/Generated/GeneratedMocks.swift @@ -414,21 +414,21 @@ class RoomProxyMock: RoomProxyProtocol { set(value) { underlyingMembersPublisher = value } } var underlyingMembersPublisher: AnyPublisher<[RoomMemberProxyProtocol], Never>! - var invitedMembersCount: UInt64 { + var invitedMembersCount: UInt { get { return underlyingInvitedMembersCount } set(value) { underlyingInvitedMembersCount = value } } - var underlyingInvitedMembersCount: UInt64! - var joinedMembersCount: UInt64 { + var underlyingInvitedMembersCount: UInt! + var joinedMembersCount: UInt { get { return underlyingJoinedMembersCount } set(value) { underlyingJoinedMembersCount = value } } - var underlyingJoinedMembersCount: UInt64! - var activeMembersCount: UInt64 { + var underlyingJoinedMembersCount: UInt! + var activeMembersCount: UInt { get { return underlyingActiveMembersCount } set(value) { underlyingActiveMembersCount = value } } - var underlyingActiveMembersCount: UInt64! + var underlyingActiveMembersCount: UInt! //MARK: - loadAvatarURLForUserId diff --git a/ElementX/Sources/Mocks/RoomProxyMock.swift b/ElementX/Sources/Mocks/RoomProxyMock.swift index 74b7c11c0..184925713 100644 --- a/ElementX/Sources/Mocks/RoomProxyMock.swift +++ b/ElementX/Sources/Mocks/RoomProxyMock.swift @@ -33,6 +33,10 @@ struct RoomProxyMockConfiguration { var hasUnreadNotifications = Bool.random() var members: [RoomMemberProxyProtocol]? var inviter: RoomMemberProxyMock? + + var invitedMembersCount: UInt = 100 + var joinedMembersCount: UInt = 50 + var activeMembersCount: UInt = 25 } extension RoomProxyMock { @@ -52,6 +56,10 @@ extension RoomProxyMock { canonicalAlias = configuration.canonicalAlias alternativeAliases = configuration.alternativeAliases hasUnreadNotifications = configuration.hasUnreadNotifications + + invitedMembersCount = configuration.invitedMembersCount + joinedMembersCount = configuration.joinedMembersCount + activeMembersCount = configuration.activeMembersCount if let members = configuration.members { membersPublisher = Just(members).eraseToAnyPublisher() diff --git a/ElementX/Sources/Screens/MediaUploadPreviewScreen/MediaUploadPreviewScreenViewModel.swift b/ElementX/Sources/Screens/MediaUploadPreviewScreen/MediaUploadPreviewScreenViewModel.swift index 392eed690..cfab9b6b4 100644 --- a/ElementX/Sources/Screens/MediaUploadPreviewScreen/MediaUploadPreviewScreenViewModel.swift +++ b/ElementX/Sources/Screens/MediaUploadPreviewScreen/MediaUploadPreviewScreenViewModel.swift @@ -44,9 +44,6 @@ class MediaUploadPreviewScreenViewModel: MediaUploadPreviewScreenViewModelType, case .send: Task { startLoading() - defer { - stopLoading() - } switch await mediaUploadingPreprocessor.processMedia(at: url) { case .success(let mediaInfo): @@ -58,9 +55,11 @@ class MediaUploadPreviewScreenViewModel: MediaUploadPreviewScreenViewModelType, showError(label: L10n.screenMediaUploadPreviewErrorFailedSending) } + stopLoading() case .failure(let error): MXLog.error("Failed processing media to upload with error: \(error)") showError(label: L10n.screenMediaUploadPreviewErrorFailedProcessing) + stopLoading() } } diff --git a/ElementX/Sources/Services/Room/RoomProxy.swift b/ElementX/Sources/Services/Room/RoomProxy.swift index 6dc7a5642..1246e1179 100644 --- a/ElementX/Sources/Services/Room/RoomProxy.swift +++ b/ElementX/Sources/Services/Room/RoomProxy.swift @@ -441,16 +441,16 @@ class RoomProxy: RoomProxyProtocol { } } - var invitedMembersCount: UInt64 { - room.invitedMembersCount() + var invitedMembersCount: UInt { + UInt(room.invitedMembersCount()) } - var joinedMembersCount: UInt64 { - room.joinedMembersCount() + var joinedMembersCount: UInt { + UInt(room.joinedMembersCount()) } - var activeMembersCount: UInt64 { - room.activeMembersCount() + var activeMembersCount: UInt { + UInt(room.activeMembersCount()) } // MARK: - Private diff --git a/ElementX/Sources/Services/Room/RoomProxyProtocol.swift b/ElementX/Sources/Services/Room/RoomProxyProtocol.swift index 378d82dbe..e903597ba 100644 --- a/ElementX/Sources/Services/Room/RoomProxyProtocol.swift +++ b/ElementX/Sources/Services/Room/RoomProxyProtocol.swift @@ -105,11 +105,11 @@ protocol RoomProxyProtocol { func fetchDetails(for eventID: String) - var invitedMembersCount: UInt64 { get } + var invitedMembersCount: UInt { get } - var joinedMembersCount: UInt64 { get } + var joinedMembersCount: UInt { get } - var activeMembersCount: UInt64 { get } + var activeMembersCount: UInt { get } } extension RoomProxyProtocol {