From c66ddfb71e4b1848cd682361c89c9da05bec6f7c Mon Sep 17 00:00:00 2001 From: Mauro <34335419+Velin92@users.noreply.github.com> Date: Thu, 7 Mar 2024 17:56:09 +0100 Subject: [PATCH] Filters, Mark Unread/Read/Favourites FF removals + code and tests clean up (#2541) --- .periphery.yml | 3 +- .../Sources/Application/AppSettings.swift | 15 ------ .../Mocks/Generated/GeneratedMocks.swift | 17 ------- .../BlockedUsersScreenCoordinator.swift | 9 ---- .../BlockedUsersScreenModels.swift | 2 - .../BlockedUsersScreenViewModel.swift | 5 -- .../BlockedUsersScreenViewModelProtocol.swift | 1 - .../Screens/HomeScreen/HomeScreenModels.swift | 10 +--- .../HomeScreen/HomeScreenViewModel.swift | 24 +--------- .../View/Filters/RoomListFilterModels.swift | 4 -- .../HomeScreen/View/HomeScreenContent.swift | 44 +++++++---------- .../HomeScreen/View/HomeScreenRoomList.swift | 48 +++++++++---------- .../InviteUsersScreenCoordinator.swift | 1 - .../InviteUsersScreenViewModel.swift | 19 +------- .../View/InviteUsersScreen.swift | 2 - .../DeveloperOptionsScreenModels.swift | 7 --- .../View/DeveloperOptionsScreen.swift | 25 ---------- .../StartChatScreenCoordinator.swift | 1 - .../StartChatScreenViewModel.swift | 17 +------ .../View/StartChatScreen.swift | 2 - .../Sources/Services/Client/ClientProxy.swift | 12 ++--- .../Room/RoomMember/RoomMemberProxy.swift | 9 +--- .../RoomMember/RoomMemberProxyProtocol.swift | 5 -- .../Sources/Services/Room/RoomProxy.swift | 10 ++-- .../Services/Room/RoomProxyProtocol.swift | 1 - .../RoomSummary/RoomSummaryProvider.swift | 20 +++----- .../Services/Users/UserDiscoveryService.swift | 4 -- .../Users/UserDiscoveryServiceProtocol.swift | 1 - .../UITests/UITestsAppCoordinator.swift | 9 +--- .../UITests/UITestsScreenIdentifier.swift | 2 - .../PreviewTests/test_homeScreen.Empty.png | 4 +- .../PreviewTests/test_homeScreen.Loaded.png | 4 +- .../Sources/InviteUsersScreenUITests.swift | 18 ------- ...n-GB-iPad-9th-generation.inviteUsers-1.png | 3 -- .../en-GB-iPad-9th-generation.inviteUsers.png | 4 +- ...Pad-9th-generation.inviteUsersInRoom-1.png | 3 -- ...ion.inviteUsersInRoomExistingMembers-1.png | 3 -- .../en-GB-iPad-9th-generation.startChat.png | 4 +- ...Pad-9th-generation.userSessionScreen-1.png | 4 +- ...Pad-9th-generation.userSessionScreen-2.png | 4 +- ...Pad-9th-generation.userSessionScreen-3.png | 4 +- .../en-GB-iPhone-14.inviteUsers-1.png | 3 -- .../en-GB-iPhone-14.inviteUsers.png | 4 +- .../en-GB-iPhone-14.inviteUsersInRoom-1.png | 3 -- ...-14.inviteUsersInRoomExistingMembers-1.png | 3 -- .../Application/en-GB-iPhone-14.startChat.png | 4 +- .../en-GB-iPhone-14.userSessionScreen-1.png | 4 +- .../en-GB-iPhone-14.userSessionScreen-2.png | 4 +- .../en-GB-iPhone-14.userSessionScreen-3.png | 4 +- ...eudo-iPad-9th-generation.inviteUsers-1.png | 3 -- ...pseudo-iPad-9th-generation.inviteUsers.png | 4 +- ...Pad-9th-generation.inviteUsersInRoom-1.png | 3 -- ...ion.inviteUsersInRoomExistingMembers-1.png | 3 -- .../pseudo-iPad-9th-generation.startChat.png | 4 +- ...Pad-9th-generation.userSessionScreen-1.png | 4 +- ...Pad-9th-generation.userSessionScreen-2.png | 4 +- ...Pad-9th-generation.userSessionScreen-3.png | 4 +- .../pseudo-iPhone-14.inviteUsers-1.png | 3 -- .../pseudo-iPhone-14.inviteUsers.png | 4 +- .../pseudo-iPhone-14.inviteUsersInRoom-1.png | 3 -- ...-14.inviteUsersInRoomExistingMembers-1.png | 3 -- .../pseudo-iPhone-14.startChat.png | 4 +- .../pseudo-iPhone-14.userSessionScreen-1.png | 4 +- .../pseudo-iPhone-14.userSessionScreen-2.png | 4 +- .../pseudo-iPhone-14.userSessionScreen-3.png | 4 +- .../Sources/HomeScreenViewModelTests.swift | 2 - .../Sources/InviteUsersViewModelTests.swift | 2 - .../Sources/StartChatViewModelTests.swift | 3 -- changelog.d/pr-2541.feature | 1 + 69 files changed, 105 insertions(+), 374 deletions(-) delete mode 100644 UITests/Sources/__Snapshots__/Application/en-GB-iPad-9th-generation.inviteUsers-1.png delete mode 100644 UITests/Sources/__Snapshots__/Application/en-GB-iPad-9th-generation.inviteUsersInRoom-1.png delete mode 100644 UITests/Sources/__Snapshots__/Application/en-GB-iPad-9th-generation.inviteUsersInRoomExistingMembers-1.png delete mode 100644 UITests/Sources/__Snapshots__/Application/en-GB-iPhone-14.inviteUsers-1.png delete mode 100644 UITests/Sources/__Snapshots__/Application/en-GB-iPhone-14.inviteUsersInRoom-1.png delete mode 100644 UITests/Sources/__Snapshots__/Application/en-GB-iPhone-14.inviteUsersInRoomExistingMembers-1.png delete mode 100644 UITests/Sources/__Snapshots__/Application/pseudo-iPad-9th-generation.inviteUsers-1.png delete mode 100644 UITests/Sources/__Snapshots__/Application/pseudo-iPad-9th-generation.inviteUsersInRoom-1.png delete mode 100644 UITests/Sources/__Snapshots__/Application/pseudo-iPad-9th-generation.inviteUsersInRoomExistingMembers-1.png delete mode 100644 UITests/Sources/__Snapshots__/Application/pseudo-iPhone-14.inviteUsers-1.png delete mode 100644 UITests/Sources/__Snapshots__/Application/pseudo-iPhone-14.inviteUsersInRoom-1.png delete mode 100644 UITests/Sources/__Snapshots__/Application/pseudo-iPhone-14.inviteUsersInRoomExistingMembers-1.png create mode 100644 changelog.d/pr-2541.feature diff --git a/.periphery.yml b/.periphery.yml index 8421edd5a..090cf22dc 100644 --- a/.periphery.yml +++ b/.periphery.yml @@ -4,11 +4,12 @@ schemes: - IntegrationTests - UITests - UnitTests +- PreviewTests targets: - ElementX - IntegrationTests - NSE -# - NCE +- PreviewTests - UITests - UnitTests report_exclude: diff --git a/ElementX/Sources/Application/AppSettings.swift b/ElementX/Sources/Application/AppSettings.swift index 9ec0b22e4..2c2e887e8 100644 --- a/ElementX/Sources/Application/AppSettings.swift +++ b/ElementX/Sources/Application/AppSettings.swift @@ -275,21 +275,6 @@ final class AppSettings { // MARK: - Feature Flags - @UserPreference(key: UserDefaultsKeys.userSuggestionsEnabled, defaultValue: false, storageType: .volatile) - var userSuggestionsEnabled - - @UserPreference(key: UserDefaultsKeys.mentionsBadgeEnabled, defaultValue: true, storageType: .userDefaults(store)) - var mentionsBadgeEnabled - - @UserPreference(key: UserDefaultsKeys.roomListFiltersEnabled, defaultValue: false, storageType: .userDefaults(store)) - var roomListFiltersEnabled - - @UserPreference(key: UserDefaultsKeys.markAsUnreadEnabled, defaultValue: false, storageType: .userDefaults(store)) - var markAsUnreadEnabled - - @UserPreference(key: UserDefaultsKeys.markAsFavouriteEnabled, defaultValue: false, storageType: .userDefaults(store)) - var markAsFavouriteEnabled - @UserPreference(key: UserDefaultsKeys.roomModerationEnabled, defaultValue: false, storageType: .userDefaults(store)) var roomModerationEnabled diff --git a/ElementX/Sources/Mocks/Generated/GeneratedMocks.swift b/ElementX/Sources/Mocks/Generated/GeneratedMocks.swift index e53ff108b..604f9389d 100644 --- a/ElementX/Sources/Mocks/Generated/GeneratedMocks.swift +++ b/ElementX/Sources/Mocks/Generated/GeneratedMocks.swift @@ -3787,23 +3787,6 @@ class UserDiscoveryServiceMock: UserDiscoveryServiceProtocol { return searchProfilesWithReturnValue } } - //MARK: - fetchSuggestions - - var fetchSuggestionsCallsCount = 0 - var fetchSuggestionsCalled: Bool { - return fetchSuggestionsCallsCount > 0 - } - var fetchSuggestionsReturnValue: Result<[UserProfileProxy], UserDiscoveryErrorType>! - var fetchSuggestionsClosure: (() async -> Result<[UserProfileProxy], UserDiscoveryErrorType>)? - - func fetchSuggestions() async -> Result<[UserProfileProxy], UserDiscoveryErrorType> { - fetchSuggestionsCallsCount += 1 - if let fetchSuggestionsClosure = fetchSuggestionsClosure { - return await fetchSuggestionsClosure() - } else { - return fetchSuggestionsReturnValue - } - } } class UserIndicatorControllerMock: UserIndicatorControllerProtocol { var window: UIWindow? diff --git a/ElementX/Sources/Screens/BlockedUsersScreen/BlockedUsersScreenCoordinator.swift b/ElementX/Sources/Screens/BlockedUsersScreen/BlockedUsersScreenCoordinator.swift index 14808b3f6..eb4c25c84 100644 --- a/ElementX/Sources/Screens/BlockedUsersScreen/BlockedUsersScreenCoordinator.swift +++ b/ElementX/Sources/Screens/BlockedUsersScreen/BlockedUsersScreenCoordinator.swift @@ -22,18 +22,9 @@ struct BlockedUsersScreenCoordinatorParameters { let userIndicatorController: UserIndicatorControllerProtocol } -enum BlockedUsersScreenCoordinatorAction { } - final class BlockedUsersScreenCoordinator: CoordinatorProtocol { private let viewModel: BlockedUsersScreenViewModelProtocol - private var cancellables = Set() - - private let actionsSubject: PassthroughSubject = .init() - var actionsPublisher: AnyPublisher { - actionsSubject.eraseToAnyPublisher() - } - init(parameters: BlockedUsersScreenCoordinatorParameters) { viewModel = BlockedUsersScreenViewModel(clientProxy: parameters.clientProxy, userIndicatorController: parameters.userIndicatorController) diff --git a/ElementX/Sources/Screens/BlockedUsersScreen/BlockedUsersScreenModels.swift b/ElementX/Sources/Screens/BlockedUsersScreen/BlockedUsersScreenModels.swift index 6ab4d3280..40919760d 100644 --- a/ElementX/Sources/Screens/BlockedUsersScreen/BlockedUsersScreenModels.swift +++ b/ElementX/Sources/Screens/BlockedUsersScreen/BlockedUsersScreenModels.swift @@ -16,8 +16,6 @@ import Foundation -enum BlockedUsersScreenViewModelAction { } - struct BlockedUsersScreenViewState: BindableState { var blockedUsers: [String] var processingUserID: String? diff --git a/ElementX/Sources/Screens/BlockedUsersScreen/BlockedUsersScreenViewModel.swift b/ElementX/Sources/Screens/BlockedUsersScreen/BlockedUsersScreenViewModel.swift index 08d6afabe..53fd79094 100644 --- a/ElementX/Sources/Screens/BlockedUsersScreen/BlockedUsersScreenViewModel.swift +++ b/ElementX/Sources/Screens/BlockedUsersScreen/BlockedUsersScreenViewModel.swift @@ -22,11 +22,6 @@ typealias BlockedUsersScreenViewModelType = StateStoreViewModel = .init() - var actionsPublisher: AnyPublisher { - actionsSubject.eraseToAnyPublisher() - } init(clientProxy: ClientProxyProtocol, userIndicatorController: UserIndicatorControllerProtocol) { diff --git a/ElementX/Sources/Screens/BlockedUsersScreen/BlockedUsersScreenViewModelProtocol.swift b/ElementX/Sources/Screens/BlockedUsersScreen/BlockedUsersScreenViewModelProtocol.swift index ae7e425ba..162aea918 100644 --- a/ElementX/Sources/Screens/BlockedUsersScreen/BlockedUsersScreenViewModelProtocol.swift +++ b/ElementX/Sources/Screens/BlockedUsersScreen/BlockedUsersScreenViewModelProtocol.swift @@ -18,7 +18,6 @@ import Combine @MainActor protocol BlockedUsersScreenViewModelProtocol { - var actionsPublisher: AnyPublisher { get } var context: BlockedUsersScreenViewModelType.Context { get } func stop() diff --git a/ElementX/Sources/Screens/HomeScreen/HomeScreenModels.swift b/ElementX/Sources/Screens/HomeScreen/HomeScreenModels.swift index 76c127ccb..99aacd895 100644 --- a/ElementX/Sources/Screens/HomeScreen/HomeScreenModels.swift +++ b/ElementX/Sources/Screens/HomeScreen/HomeScreenModels.swift @@ -89,10 +89,6 @@ struct HomeScreenViewState: BindableState { var rooms: [HomeScreenRoom] = [] var roomListMode: HomeScreenRoomListMode = .skeletons - var areFiltersEnabled = false - var markAsUnreadEnabled = false - var markAsFavouriteEnabled = false - var hasPendingInvitations = false var hasUnreadPendingInvitations = false @@ -120,11 +116,7 @@ struct HomeScreenViewState: BindableState { } var shouldShowEmptyFilterState: Bool { - shouldShowFilters && bindings.filtersState.isFiltering && visibleRooms.isEmpty - } - - var shouldShowFilters: Bool { - areFiltersEnabled && !bindings.isSearchFieldFocused + !bindings.isSearchFieldFocused && bindings.filtersState.isFiltering && visibleRooms.isEmpty } } diff --git a/ElementX/Sources/Screens/HomeScreen/HomeScreenViewModel.swift b/ElementX/Sources/Screens/HomeScreen/HomeScreenViewModel.swift index 0fc3e17e2..243bdfa43 100644 --- a/ElementX/Sources/Screens/HomeScreen/HomeScreenViewModel.swift +++ b/ElementX/Sources/Screens/HomeScreen/HomeScreenViewModel.swift @@ -100,28 +100,6 @@ class HomeScreenViewModel: HomeScreenViewModelType, HomeScreenViewModelProtocol .weakAssign(to: \.state.selectedRoomID, on: self) .store(in: &cancellables) - appSettings.$roomListFiltersEnabled - .sink { [weak self] value in - guard let self else { - return - } - if !value { - state.areFiltersEnabled = false - state.bindings.filtersState.clearFilters() - } else { - state.areFiltersEnabled = true - } - } - .store(in: &cancellables) - - appSettings.$markAsUnreadEnabled - .weakAssign(to: \.state.markAsUnreadEnabled, on: self) - .store(in: &cancellables) - - appSettings.$markAsFavouriteEnabled - .weakAssign(to: \.state.markAsFavouriteEnabled, on: self) - .store(in: &cancellables) - appSettings.$hideUnreadMessagesBadge .sink { [weak self] _ in self?.updateRooms() } .store(in: &cancellables) @@ -235,7 +213,7 @@ class HomeScreenViewModel: HomeScreenViewModelType, HomeScreenViewModelProtocol if state.bindings.isSearchFieldFocused { roomSummaryProvider?.setFilter(.search(query: state.bindings.searchQuery)) } else { - roomSummaryProvider?.setFilter(.all(filters: state.areFiltersEnabled ? state.bindings.filtersState.activeFilters.set : [])) + roomSummaryProvider?.setFilter(.all(filters: state.bindings.filtersState.activeFilters.set)) } } } diff --git a/ElementX/Sources/Screens/HomeScreen/View/Filters/RoomListFilterModels.swift b/ElementX/Sources/Screens/HomeScreen/View/Filters/RoomListFilterModels.swift index 1f006a175..1b1ac568e 100644 --- a/ElementX/Sources/Screens/HomeScreen/View/Filters/RoomListFilterModels.swift +++ b/ElementX/Sources/Screens/HomeScreen/View/Filters/RoomListFilterModels.swift @@ -89,10 +89,6 @@ struct RoomListFiltersState { return availableFilters.elements } - var orderedFilters: [RoomListFilter] { - activeFilters.elements + availableFilters - } - var isFiltering: Bool { !activeFilters.isEmpty } diff --git a/ElementX/Sources/Screens/HomeScreen/View/HomeScreenContent.swift b/ElementX/Sources/Screens/HomeScreen/View/HomeScreenContent.swift index 799f82f24..fa3760d4c 100644 --- a/ElementX/Sources/Screens/HomeScreen/View/HomeScreenContent.swift +++ b/ElementX/Sources/Screens/HomeScreen/View/HomeScreenContent.swift @@ -53,36 +53,24 @@ struct HomeScreenContent: View { .layoutPriority(1) } case .rooms: - if context.viewState.areFiltersEnabled { - // Showing empty views in pinned headers makes the room list spasm when reaching the top - LazyVStack(spacing: 0, pinnedViews: [.sectionHeaders]) { - Section { - if context.viewState.shouldShowEmptyFilterState { - RoomListFiltersEmptyStateView(state: context.filtersState) - .frame(height: geometry.size.height - topSectionFrame.height) - } else { - HomeScreenRoomList(context: context) - } - } header: { - topSection - .readFrame($topSectionFrame) + // Showing empty views in pinned headers makes the room list spasm when reaching the top + LazyVStack(spacing: 0, pinnedViews: [.sectionHeaders]) { + Section { + if context.viewState.shouldShowEmptyFilterState { + RoomListFiltersEmptyStateView(state: context.filtersState) + .frame(height: geometry.size.height - topSectionFrame.height) + } else { + HomeScreenRoomList(context: context) } + } header: { + topSection + .readFrame($topSectionFrame) } - .isSearching($context.isSearchFieldFocused) - .searchable(text: $context.searchQuery) - .compoundSearchField() - .disableAutocorrection(true) - } else { - topSection - - LazyVStack(spacing: 0) { - HomeScreenRoomList(context: context) - .isSearching($context.isSearchFieldFocused) - } - .searchable(text: $context.searchQuery) - .compoundSearchField() - .disableAutocorrection(true) } + .isSearching($context.isSearchFieldFocused) + .searchable(text: $context.searchQuery) + .compoundSearchField() + .disableAutocorrection(true) case .migration: EmptyView() } @@ -121,7 +109,7 @@ struct HomeScreenContent: View { /// The session verification banner and invites button if either are needed. private var topSection: some View { VStack(spacing: 0) { - if context.viewState.shouldShowFilters { + if !context.isSearchFieldFocused { filters } diff --git a/ElementX/Sources/Screens/HomeScreen/View/HomeScreenRoomList.swift b/ElementX/Sources/Screens/HomeScreen/View/HomeScreenRoomList.swift index 47ac6e2d1..732cbadad 100644 --- a/ElementX/Sources/Screens/HomeScreen/View/HomeScreenRoomList.swift +++ b/ElementX/Sources/Screens/HomeScreen/View/HomeScreenRoomList.swift @@ -39,35 +39,31 @@ struct HomeScreenRoomList: View { HomeScreenRoomCell(room: room, context: context, isSelected: isSelected) .contextMenu { - if context.viewState.markAsUnreadEnabled { - if room.badges.isDotShown { - Button { - context.send(viewAction: .markRoomAsRead(roomIdentifier: room.id)) - } label: { - Text(L10n.screenRoomlistMarkAsRead) - } - } else { - Button { - context.send(viewAction: .markRoomAsUnread(roomIdentifier: room.id)) - } label: { - Text(L10n.screenRoomlistMarkAsUnread) - } + if room.badges.isDotShown { + Button { + context.send(viewAction: .markRoomAsRead(roomIdentifier: room.id)) + } label: { + Text(L10n.screenRoomlistMarkAsRead) + } + } else { + Button { + context.send(viewAction: .markRoomAsUnread(roomIdentifier: room.id)) + } label: { + Text(L10n.screenRoomlistMarkAsUnread) } } - if context.viewState.markAsFavouriteEnabled { - if room.isFavourite { - Button { - context.send(viewAction: .markRoomAsFavourite(roomIdentifier: room.id, isFavourite: false)) - } label: { - Label(L10n.commonFavourited, icon: \.favouriteSolid) - } - } else { - Button { - context.send(viewAction: .markRoomAsFavourite(roomIdentifier: room.id, isFavourite: true)) - } label: { - Label(L10n.commonFavourite, icon: \.favourite) - } + if room.isFavourite { + Button { + context.send(viewAction: .markRoomAsFavourite(roomIdentifier: room.id, isFavourite: false)) + } label: { + Label(L10n.commonFavourited, icon: \.favouriteSolid) + } + } else { + Button { + context.send(viewAction: .markRoomAsFavourite(roomIdentifier: room.id, isFavourite: true)) + } label: { + Label(L10n.commonFavourite, icon: \.favourite) } } diff --git a/ElementX/Sources/Screens/InviteUsersScreen/InviteUsersScreenCoordinator.swift b/ElementX/Sources/Screens/InviteUsersScreen/InviteUsersScreenCoordinator.swift index 509f9bdff..bd8df5ad4 100644 --- a/ElementX/Sources/Screens/InviteUsersScreen/InviteUsersScreenCoordinator.swift +++ b/ElementX/Sources/Screens/InviteUsersScreen/InviteUsersScreenCoordinator.swift @@ -46,7 +46,6 @@ final class InviteUsersScreenCoordinator: CoordinatorProtocol { roomType: parameters.roomType, mediaProvider: parameters.mediaProvider, userDiscoveryService: parameters.userDiscoveryService, - appSettings: ServiceLocator.shared.settings, userIndicatorController: parameters.userIndicatorController) } diff --git a/ElementX/Sources/Screens/InviteUsersScreen/InviteUsersScreenViewModel.swift b/ElementX/Sources/Screens/InviteUsersScreen/InviteUsersScreenViewModel.swift index 1d19d87c1..99d361c21 100644 --- a/ElementX/Sources/Screens/InviteUsersScreen/InviteUsersScreenViewModel.swift +++ b/ElementX/Sources/Screens/InviteUsersScreen/InviteUsersScreenViewModel.swift @@ -23,7 +23,6 @@ typealias InviteUsersScreenViewModelType = StateStoreViewModel = .init() @@ -36,11 +35,9 @@ class InviteUsersScreenViewModel: InviteUsersScreenViewModelType, InviteUsersScr roomType: InviteUsersScreenRoomType, mediaProvider: MediaProviderProtocol, userDiscoveryService: UserDiscoveryServiceProtocol, - appSettings: AppSettings, userIndicatorController: UserIndicatorControllerProtocol) { self.roomType = roomType self.userDiscoveryService = userDiscoveryService - self.appSettings = appSettings self.userIndicatorController = userIndicatorController super.init(initialViewState: InviteUsersScreenViewState(selectedUsers: selectedUsers.value, isCreatingRoom: roomType.isCreatingRoom), imageProvider: mediaProvider) @@ -130,7 +127,7 @@ class InviteUsersScreenViewModel: InviteUsersScreenViewModelType, InviteUsersScr private func fetchUsers() { guard searchQuery.count >= 3 else { - fetchSuggestions() + state.usersSection = .init(type: .suggestions, users: []) return } @@ -142,20 +139,6 @@ class InviteUsersScreenViewModel: InviteUsersScreenViewModelType, InviteUsersScr } } - private func fetchSuggestions() { - guard appSettings.userSuggestionsEnabled else { - state.usersSection = .init(type: .suggestions, users: []) - return - } - - state.isSearching = true - fetchUsersTask = Task { - let result = await userDiscoveryService.fetchSuggestions() - guard !Task.isCancelled else { return } - handleResult(for: .suggestions, result: result) - } - } - private func handleResult(for sectionType: UserDiscoverySectionType, result: Result<[UserProfileProxy], UserDiscoveryErrorType>) { state.isSearching = false diff --git a/ElementX/Sources/Screens/InviteUsersScreen/View/InviteUsersScreen.swift b/ElementX/Sources/Screens/InviteUsersScreen/View/InviteUsersScreen.swift index dcf7be4a5..b69424fdb 100644 --- a/ElementX/Sources/Screens/InviteUsersScreen/View/InviteUsersScreen.swift +++ b/ElementX/Sources/Screens/InviteUsersScreen/View/InviteUsersScreen.swift @@ -159,13 +159,11 @@ struct InviteUsersScreen: View { struct InviteUsersScreen_Previews: PreviewProvider, TestablePreview { static let viewModel = { let userDiscoveryService = UserDiscoveryServiceMock() - userDiscoveryService.fetchSuggestionsReturnValue = .success([.mockAlice]) userDiscoveryService.searchProfilesWithReturnValue = .success([.mockAlice]) return InviteUsersScreenViewModel(selectedUsers: .init([]), roomType: .draft, mediaProvider: MockMediaProvider(), userDiscoveryService: userDiscoveryService, - appSettings: ServiceLocator.shared.settings, userIndicatorController: UserIndicatorControllerMock()) }() diff --git a/ElementX/Sources/Screens/Settings/DeveloperOptionsScreen/DeveloperOptionsScreenModels.swift b/ElementX/Sources/Screens/Settings/DeveloperOptionsScreen/DeveloperOptionsScreenModels.swift index f918157cb..413be2871 100644 --- a/ElementX/Sources/Screens/Settings/DeveloperOptionsScreen/DeveloperOptionsScreenModels.swift +++ b/ElementX/Sources/Screens/Settings/DeveloperOptionsScreen/DeveloperOptionsScreenModels.swift @@ -47,15 +47,8 @@ protocol DeveloperOptionsProtocol: AnyObject { var logLevel: TracingConfiguration.LogLevel { get set } var otlpTracingEnabled: Bool { get set } var shouldCollapseRoomStateEvents: Bool { get set } - var userSuggestionsEnabled: Bool { get set } - var mentionsBadgeEnabled: Bool { get set } - var roomListFiltersEnabled: Bool { get set } var hideUnreadMessagesBadge: Bool { get set } - - var markAsUnreadEnabled: Bool { get set } - var markAsFavouriteEnabled: Bool { get set } var roomModerationEnabled: Bool { get set } - var elementCallBaseURL: URL { get set } } diff --git a/ElementX/Sources/Screens/Settings/DeveloperOptionsScreen/View/DeveloperOptionsScreen.swift b/ElementX/Sources/Screens/Settings/DeveloperOptionsScreen/View/DeveloperOptionsScreen.swift index 3d6ac80d3..cd321754a 100644 --- a/ElementX/Sources/Screens/Settings/DeveloperOptionsScreen/View/DeveloperOptionsScreen.swift +++ b/ElementX/Sources/Screens/Settings/DeveloperOptionsScreen/View/DeveloperOptionsScreen.swift @@ -41,32 +41,7 @@ struct DeveloperOptionsScreen: View { } } - Section("Room creation") { - Toggle(isOn: $context.userSuggestionsEnabled) { - Text("User suggestions") - } - } - - Section("Mentions") { - Toggle(isOn: $context.mentionsBadgeEnabled) { - Text("Mentions badge") - Text("Requires app reboot") - } - } - Section("Room List") { - Toggle(isOn: $context.roomListFiltersEnabled) { - Text("Show filters") - } - - Toggle(isOn: $context.markAsUnreadEnabled) { - Text("Mark as unread") - } - - Toggle(isOn: $context.markAsFavouriteEnabled) { - Text("Mark as favourite") - } - Toggle(isOn: $context.hideUnreadMessagesBadge) { Text("Hide grey dots") } diff --git a/ElementX/Sources/Screens/StartChatScreen/StartChatScreenCoordinator.swift b/ElementX/Sources/Screens/StartChatScreen/StartChatScreenCoordinator.swift index 6ffba3f17..785a52e46 100644 --- a/ElementX/Sources/Screens/StartChatScreen/StartChatScreenCoordinator.swift +++ b/ElementX/Sources/Screens/StartChatScreen/StartChatScreenCoordinator.swift @@ -54,7 +54,6 @@ final class StartChatScreenCoordinator: CoordinatorProtocol { self.parameters = parameters viewModel = StartChatScreenViewModel(userSession: parameters.userSession, - userSuggestionsEnabled: ServiceLocator.shared.settings.userSuggestionsEnabled, analytics: ServiceLocator.shared.analytics, userIndicatorController: parameters.userIndicatorController, userDiscoveryService: parameters.userDiscoveryService) diff --git a/ElementX/Sources/Screens/StartChatScreen/StartChatScreenViewModel.swift b/ElementX/Sources/Screens/StartChatScreen/StartChatScreenViewModel.swift index d32c48d2c..7cc95ca42 100644 --- a/ElementX/Sources/Screens/StartChatScreen/StartChatScreenViewModel.swift +++ b/ElementX/Sources/Screens/StartChatScreen/StartChatScreenViewModel.swift @@ -21,7 +21,6 @@ typealias StartChatScreenViewModelType = StateStoreViewModel= 3 else { - fetchSuggestions() + state.usersSection = .init(type: .suggestions, users: []) return } fetchUsersTask = Task { @@ -115,18 +112,6 @@ class StartChatScreenViewModel: StartChatScreenViewModelType, StartChatScreenVie } } - private func fetchSuggestions() { - guard userSuggestionsEnabled else { - state.usersSection = .init(type: .suggestions, users: []) - return - } - fetchUsersTask = Task { - let result = await userDiscoveryService.fetchSuggestions() - guard !Task.isCancelled else { return } - handleResult(for: .suggestions, result: result) - } - } - private func handleResult(for sectionType: UserDiscoverySectionType, result: Result<[UserProfileProxy], UserDiscoveryErrorType>) { switch result { case .success(let users): diff --git a/ElementX/Sources/Screens/StartChatScreen/View/StartChatScreen.swift b/ElementX/Sources/Screens/StartChatScreen/View/StartChatScreen.swift index d673ad90b..63a9c2429 100644 --- a/ElementX/Sources/Screens/StartChatScreen/View/StartChatScreen.swift +++ b/ElementX/Sources/Screens/StartChatScreen/View/StartChatScreen.swift @@ -133,10 +133,8 @@ struct StartChatScreen_Previews: PreviewProvider, TestablePreview { mediaProvider: MockMediaProvider(), voiceMessageMediaManager: VoiceMessageMediaManagerMock()) let userDiscoveryService = UserDiscoveryServiceMock() - userDiscoveryService.fetchSuggestionsReturnValue = .success([.mockAlice]) userDiscoveryService.searchProfilesWithReturnValue = .success([.mockAlice]) let viewModel = StartChatScreenViewModel(userSession: userSession, - userSuggestionsEnabled: true, analytics: ServiceLocator.shared.analytics, userIndicatorController: UserIndicatorControllerMock(), userDiscoveryService: userDiscoveryService) diff --git a/ElementX/Sources/Services/Client/ClientProxy.swift b/ElementX/Sources/Services/Client/ClientProxy.swift index b5f5d6bca..29f3c36c6 100644 --- a/ElementX/Sources/Services/Client/ClientProxy.swift +++ b/ElementX/Sources/Services/Client/ClientProxy.swift @@ -575,25 +575,19 @@ class ClientProxy: ClientProxyProtocol { eventStringBuilder: eventStringBuilder, name: "AllRooms", shouldUpdateVisibleRange: true, - notificationSettings: notificationSettings, - backgroundTaskService: backgroundTaskService, - appSettings: appSettings) + notificationSettings: notificationSettings) try await roomSummaryProvider?.setRoomList(roomListService.allRooms()) alternateRoomSummaryProvider = RoomSummaryProvider(roomListService: roomListService, eventStringBuilder: eventStringBuilder, name: "MessageForwarding", - notificationSettings: notificationSettings, - backgroundTaskService: backgroundTaskService, - appSettings: appSettings) + notificationSettings: notificationSettings) try await alternateRoomSummaryProvider?.setRoomList(roomListService.allRooms()) inviteSummaryProvider = RoomSummaryProvider(roomListService: roomListService, eventStringBuilder: eventStringBuilder, name: "Invites", - notificationSettings: notificationSettings, - backgroundTaskService: backgroundTaskService, - appSettings: appSettings) + notificationSettings: notificationSettings) try await inviteSummaryProvider?.setRoomList(roomListService.invites()) self.syncService = syncService diff --git a/ElementX/Sources/Services/Room/RoomMember/RoomMemberProxy.swift b/ElementX/Sources/Services/Room/RoomMember/RoomMemberProxy.swift index cd18073fd..643fd4c8b 100644 --- a/ElementX/Sources/Services/Room/RoomMember/RoomMemberProxy.swift +++ b/ElementX/Sources/Services/Room/RoomMember/RoomMemberProxy.swift @@ -18,16 +18,9 @@ import Foundation import MatrixRustSDK final class RoomMemberProxy: RoomMemberProxyProtocol { - private let backgroundTaskService: BackgroundTaskServiceProtocol private let member: RoomMember - private let backgroundAccountDataTaskName = "SendAccountDataEvent" - private var sendAccountDataEventBackgroundTask: BackgroundTaskProtocol? - - private let userInitiatedDispatchQueue = DispatchQueue(label: "io.element.elementx.roommemberproxy.userinitiated", qos: .userInitiated) - - init(member: RoomMember, backgroundTaskService: BackgroundTaskServiceProtocol) { - self.backgroundTaskService = backgroundTaskService + init(member: RoomMember) { self.member = member } diff --git a/ElementX/Sources/Services/Room/RoomMember/RoomMemberProxyProtocol.swift b/ElementX/Sources/Services/Room/RoomMember/RoomMemberProxyProtocol.swift index 97dda711b..a57792b97 100644 --- a/ElementX/Sources/Services/Room/RoomMember/RoomMemberProxyProtocol.swift +++ b/ElementX/Sources/Services/Room/RoomMember/RoomMemberProxyProtocol.swift @@ -17,11 +17,6 @@ import Foundation import MatrixRustSDK -enum RoomMemberProxyError: Error { - case ignoreUserFailed - case unignoreUserFailed -} - // sourcery: AutoMockable protocol RoomMemberProxyProtocol: AnyObject { var userID: String { get } diff --git a/ElementX/Sources/Services/Room/RoomProxy.swift b/ElementX/Sources/Services/Room/RoomProxy.swift index 52d22bc12..98d10c6c3 100644 --- a/ElementX/Sources/Services/Room/RoomProxy.swift +++ b/ElementX/Sources/Services/Room/RoomProxy.swift @@ -195,9 +195,7 @@ class RoomProxy: RoomProxyProtocol { do { let membersNoSyncIterator = try await room.membersNoSync() if let members = membersNoSyncIterator.nextChunk(chunkSize: membersNoSyncIterator.len()) { - membersSubject.value = members.map { - RoomMemberProxy(member: $0, backgroundTaskService: self.backgroundTaskService) - } + membersSubject.value = members.map(RoomMemberProxy.init) } } catch { MXLog.error("[RoomProxy] Failed to update members using no sync API: \(error)") @@ -207,9 +205,7 @@ class RoomProxy: RoomProxyProtocol { // Then we update members using the sync API, this is slower but will get us the latest members let membersIterator = try await room.members() if let members = membersIterator.nextChunk(chunkSize: membersIterator.len()) { - membersSubject.value = members.map { - RoomMemberProxy(member: $0, backgroundTaskService: self.backgroundTaskService) - } + membersSubject.value = members.map(RoomMemberProxy.init) } } catch { MXLog.error("[RoomProxy] Failed to update members using sync API: \(error)") @@ -228,7 +224,7 @@ class RoomProxy: RoomProxyProtocol { do { let member = try await room.member(userId: userID) - return .success(RoomMemberProxy(member: member, backgroundTaskService: backgroundTaskService)) + return .success(RoomMemberProxy(member: member)) } catch { return .failure(.failedRetrievingMember) } diff --git a/ElementX/Sources/Services/Room/RoomProxyProtocol.swift b/ElementX/Sources/Services/Room/RoomProxyProtocol.swift index 5d2c7f07d..6549ecb2f 100644 --- a/ElementX/Sources/Services/Room/RoomProxyProtocol.swift +++ b/ElementX/Sources/Services/Room/RoomProxyProtocol.swift @@ -21,7 +21,6 @@ import MatrixRustSDK enum RoomProxyError: Error, Equatable { case failedRedactingEvent case failedReportingContent - case failedIgnoringUser case failedRetrievingMember case failedLeavingRoom case failedAcceptingInvite diff --git a/ElementX/Sources/Services/Room/RoomSummary/RoomSummaryProvider.swift b/ElementX/Sources/Services/Room/RoomSummary/RoomSummaryProvider.swift index 9df8f614f..c7cadaa59 100644 --- a/ElementX/Sources/Services/Room/RoomSummary/RoomSummaryProvider.swift +++ b/ElementX/Sources/Services/Room/RoomSummary/RoomSummaryProvider.swift @@ -24,9 +24,7 @@ class RoomSummaryProvider: RoomSummaryProviderProtocol { private let name: String private let shouldUpdateVisibleRange: Bool private let notificationSettings: NotificationSettingsProxyProtocol - private let backgroundTaskService: BackgroundTaskServiceProtocol - private let appSettings: AppSettings - + private let roomListPageSize = 200 private let serialDispatchQueue: DispatchQueue @@ -67,17 +65,13 @@ class RoomSummaryProvider: RoomSummaryProviderProtocol { eventStringBuilder: RoomEventStringBuilder, name: String, shouldUpdateVisibleRange: Bool = false, - notificationSettings: NotificationSettingsProxyProtocol, - backgroundTaskService: BackgroundTaskServiceProtocol, - appSettings: AppSettings) { + notificationSettings: NotificationSettingsProxyProtocol) { self.roomListService = roomListService serialDispatchQueue = DispatchQueue(label: "io.element.elementx.roomsummaryprovider", qos: .default) self.eventStringBuilder = eventStringBuilder self.name = name self.shouldUpdateVisibleRange = shouldUpdateVisibleRange self.notificationSettings = notificationSettings - self.backgroundTaskService = backgroundTaskService - self.appSettings = appSettings diffsPublisher .receive(on: serialDispatchQueue) @@ -240,7 +234,7 @@ class RoomSummaryProvider: RoomSummaryProviderProtocol { var inviterProxy: RoomMemberProxyProtocol? if let inviter = roomInfo.inviter { - inviterProxy = RoomMemberProxy(member: inviter, backgroundTaskService: backgroundTaskService) + inviterProxy = RoomMemberProxy(member: inviter) } let notificationMode = roomInfo.userDefinedNotificationMode.flatMap { RoomNotificationModeProxy.from(roomNotificationMode: $0) } @@ -251,14 +245,14 @@ class RoomSummaryProvider: RoomSummaryProviderProtocol { avatarURL: roomInfo.avatarUrl.flatMap(URL.init(string:)), lastMessage: attributedLastMessage, lastMessageFormattedTimestamp: lastMessageFormattedTimestamp, - unreadMessagesCount: appSettings.mentionsBadgeEnabled ? UInt(roomInfo.numUnreadMessages) : 0, - unreadMentionsCount: appSettings.mentionsBadgeEnabled ? UInt(roomInfo.numUnreadMentions) : 0, - unreadNotificationsCount: appSettings.mentionsBadgeEnabled ? UInt(roomInfo.numUnreadNotifications) : UInt(roomInfo.notificationCount), + unreadMessagesCount: UInt(roomInfo.numUnreadMessages), + unreadMentionsCount: UInt(roomInfo.numUnreadMentions), + unreadNotificationsCount: UInt(roomInfo.numUnreadNotifications), notificationMode: notificationMode, canonicalAlias: roomInfo.canonicalAlias, inviter: inviterProxy, hasOngoingCall: roomInfo.hasRoomCall, - isMarkedUnread: appSettings.markAsUnreadEnabled ? roomInfo.isMarkedUnread : false, + isMarkedUnread: roomInfo.isMarkedUnread, isFavourite: roomInfo.isFavourite) return invalidated ? .invalidated(details: details) : .filled(details: details) diff --git a/ElementX/Sources/Services/Users/UserDiscoveryService.swift b/ElementX/Sources/Services/Users/UserDiscoveryService.swift index 92c3b8de7..a0b1d75af 100644 --- a/ElementX/Sources/Services/Users/UserDiscoveryService.swift +++ b/ElementX/Sources/Services/Users/UserDiscoveryService.swift @@ -23,10 +23,6 @@ final class UserDiscoveryService: UserDiscoveryServiceProtocol { self.clientProxy = clientProxy } - func fetchSuggestions() async -> Result<[UserProfileProxy], UserDiscoveryErrorType> { - .success(filterAccountOwner([.mockAlice, .mockBob, .mockCharlie])) - } - func searchProfiles(with searchQuery: String) async -> Result<[UserProfileProxy], UserDiscoveryErrorType> { async let queriedProfile = profileIfPossible(with: searchQuery) diff --git a/ElementX/Sources/Services/Users/UserDiscoveryServiceProtocol.swift b/ElementX/Sources/Services/Users/UserDiscoveryServiceProtocol.swift index 118211a43..df1220dc5 100644 --- a/ElementX/Sources/Services/Users/UserDiscoveryServiceProtocol.swift +++ b/ElementX/Sources/Services/Users/UserDiscoveryServiceProtocol.swift @@ -23,5 +23,4 @@ enum UserDiscoveryErrorType: Error { // sourcery: AutoMockable protocol UserDiscoveryServiceProtocol { func searchProfiles(with searchQuery: String) async -> Result<[UserProfileProxy], UserDiscoveryErrorType> - func fetchSuggestions() async -> Result<[UserProfileProxy], UserDiscoveryErrorType> } diff --git a/ElementX/Sources/UITests/UITestsAppCoordinator.swift b/ElementX/Sources/UITests/UITestsAppCoordinator.swift index c991d3e8b..860f33296 100644 --- a/ElementX/Sources/UITests/UITestsAppCoordinator.swift +++ b/ElementX/Sources/UITests/UITestsAppCoordinator.swift @@ -743,10 +743,8 @@ class MockScreen: Identifiable { navigationStackCoordinator.setRootCoordinator(coordinator) return navigationStackCoordinator case .startChat: - ServiceLocator.shared.settings.userSuggestionsEnabled = true let navigationStackCoordinator = NavigationStackCoordinator() let userDiscoveryMock = UserDiscoveryServiceMock() - userDiscoveryMock.fetchSuggestionsReturnValue = .success([.mockAlice, .mockBob, .mockCharlie]) userDiscoveryMock.searchProfilesWithReturnValue = .success([]) let userSession = MockUserSession(clientProxy: ClientProxyMock(.init(userID: "@mock:client.com")), mediaProvider: MockMediaProvider(), @@ -763,7 +761,6 @@ class MockScreen: Identifiable { let navigationStackCoordinator = NavigationStackCoordinator() let clientProxy = ClientProxyMock(.init(userID: "@mock:client.com")) let userDiscoveryMock = UserDiscoveryServiceMock() - userDiscoveryMock.fetchSuggestionsReturnValue = .success([]) userDiscoveryMock.searchProfilesWithReturnValue = .success([.mockBob, .mockBobby]) let userSession = MockUserSession(clientProxy: clientProxy, mediaProvider: MockMediaProvider(), voiceMessageMediaManager: VoiceMessageMediaManagerMock()) let coordinator = StartChatScreenCoordinator(parameters: .init(orientationManager: OrientationManagerMock(), @@ -862,15 +859,13 @@ class MockScreen: Identifiable { let coordinator = InvitesScreenCoordinator(parameters: .init(userSession: MockUserSession(clientProxy: clientProxy, mediaProvider: MockMediaProvider(), voiceMessageMediaManager: VoiceMessageMediaManagerMock()))) navigationStackCoordinator.setRootCoordinator(coordinator) return navigationStackCoordinator - case .inviteUsers, .inviteUsersInRoom, .inviteUsersInRoomExistingMembers: - ServiceLocator.shared.settings.userSuggestionsEnabled = true + case .inviteUsers: let navigationStackCoordinator = NavigationStackCoordinator() let userDiscoveryMock = UserDiscoveryServiceMock() - userDiscoveryMock.fetchSuggestionsReturnValue = .success([.mockAlice, .mockBob, .mockCharlie]) userDiscoveryMock.searchProfilesWithReturnValue = .success([]) let mediaProvider = MockMediaProvider() let usersSubject = CurrentValueSubject<[UserProfileProxy], Never>([]) - let members: [RoomMemberProxyMock] = id == .inviteUsersInRoomExistingMembers ? [.mockInvitedAlice, .mockBob] : [] + let members: [RoomMemberProxyMock] = [] let roomProxy = RoomProxyMock(with: .init(name: "test", members: members)) let roomType: InviteUsersScreenRoomType = id == .inviteUsers ? .draft : .room(roomProxy: roomProxy) let coordinator = InviteUsersScreenCoordinator(parameters: .init(selectedUsers: usersSubject.asCurrentValuePublisher(), diff --git a/ElementX/Sources/UITests/UITestsScreenIdentifier.swift b/ElementX/Sources/UITests/UITestsScreenIdentifier.swift index 9700eee43..bd9537d61 100644 --- a/ElementX/Sources/UITests/UITestsScreenIdentifier.swift +++ b/ElementX/Sources/UITests/UITestsScreenIdentifier.swift @@ -80,8 +80,6 @@ enum UITestsScreenIdentifier: String { case invitesWithBadges case invitesNoInvites case inviteUsers - case inviteUsersInRoom - case inviteUsersInRoomExistingMembers case createRoom case createRoomNoUsers case createPoll diff --git a/PreviewTests/__Snapshots__/PreviewTests/test_homeScreen.Empty.png b/PreviewTests/__Snapshots__/PreviewTests/test_homeScreen.Empty.png index a2fb67f36..b18cb01a1 100644 --- a/PreviewTests/__Snapshots__/PreviewTests/test_homeScreen.Empty.png +++ b/PreviewTests/__Snapshots__/PreviewTests/test_homeScreen.Empty.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:82fb6aa4a6fbe1bec12bcdcfe2ef10ef0c76ba077e7cbb069f7c3e96e6e870d5 -size 103016 +oid sha256:3fa48b92d820d0c1e9fb6a8a597208bb2e80cf304de5f083609feafe7723061a +size 117380 diff --git a/PreviewTests/__Snapshots__/PreviewTests/test_homeScreen.Loaded.png b/PreviewTests/__Snapshots__/PreviewTests/test_homeScreen.Loaded.png index 50602870b..f9e463826 100644 --- a/PreviewTests/__Snapshots__/PreviewTests/test_homeScreen.Loaded.png +++ b/PreviewTests/__Snapshots__/PreviewTests/test_homeScreen.Loaded.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ad4d46806bc06ac24b11f3dfed1b7490e7d1cf83f7e348a00a114d611bfca211 -size 296045 +oid sha256:8a38db286014a40b855c6db7c6b4a7517822f76e7f110543178c36c3812e7648 +size 307743 diff --git a/UITests/Sources/InviteUsersScreenUITests.swift b/UITests/Sources/InviteUsersScreenUITests.swift index 132a11b47..fbedf2748 100644 --- a/UITests/Sources/InviteUsersScreenUITests.swift +++ b/UITests/Sources/InviteUsersScreenUITests.swift @@ -22,22 +22,4 @@ class InviteUsersScreenUITests: XCTestCase { let app = Application.launch(.inviteUsers) try await app.assertScreenshot(.inviteUsers) } - - func testSelectedUsers() async throws { - let app = Application.launch(.inviteUsers) - app.buttons[A11yIdentifiers.inviteUsersScreen.userProfile].firstMatch.tap() - try await app.assertScreenshot(.inviteUsers, step: 1) - } - - func testInviteUsers() async throws { - let app = Application.launch(.inviteUsersInRoom) - app.buttons[A11yIdentifiers.inviteUsersScreen.userProfile].firstMatch.tap() - try await app.assertScreenshot(.inviteUsersInRoom, step: 1) - } - - func testInviteUserExistingMembers() async throws { - let app = Application.launch(.inviteUsersInRoomExistingMembers) - app.buttons[A11yIdentifiers.inviteUsersScreen.userProfile].firstMatch.tap() - try await app.assertScreenshot(.inviteUsersInRoomExistingMembers, step: 1) - } } diff --git a/UITests/Sources/__Snapshots__/Application/en-GB-iPad-9th-generation.inviteUsers-1.png b/UITests/Sources/__Snapshots__/Application/en-GB-iPad-9th-generation.inviteUsers-1.png deleted file mode 100644 index ef31037d2..000000000 --- a/UITests/Sources/__Snapshots__/Application/en-GB-iPad-9th-generation.inviteUsers-1.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:7df4611bd9e2f673e236f0b5f70df91b0060e1ecec94d67e2abffbc2b8fe5ba0 -size 105433 diff --git a/UITests/Sources/__Snapshots__/Application/en-GB-iPad-9th-generation.inviteUsers.png b/UITests/Sources/__Snapshots__/Application/en-GB-iPad-9th-generation.inviteUsers.png index 317697537..113dddeb8 100644 --- a/UITests/Sources/__Snapshots__/Application/en-GB-iPad-9th-generation.inviteUsers.png +++ b/UITests/Sources/__Snapshots__/Application/en-GB-iPad-9th-generation.inviteUsers.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6caae22557a376372cc80a520f574dad25d0a3ffe9bc4015f0b95b96fd186e13 -size 95699 +oid sha256:00c267f37fb0d9d5e85ad941231292d88f879ab20973cb244454f6d07a70a09f +size 63815 diff --git a/UITests/Sources/__Snapshots__/Application/en-GB-iPad-9th-generation.inviteUsersInRoom-1.png b/UITests/Sources/__Snapshots__/Application/en-GB-iPad-9th-generation.inviteUsersInRoom-1.png deleted file mode 100644 index b3af26ea3..000000000 --- a/UITests/Sources/__Snapshots__/Application/en-GB-iPad-9th-generation.inviteUsersInRoom-1.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c3f8cd03eb57875402afe6320915fe247e33205e24cdffd99334ca6c7d017215 -size 107065 diff --git a/UITests/Sources/__Snapshots__/Application/en-GB-iPad-9th-generation.inviteUsersInRoomExistingMembers-1.png b/UITests/Sources/__Snapshots__/Application/en-GB-iPad-9th-generation.inviteUsersInRoomExistingMembers-1.png deleted file mode 100644 index a0dd3bff3..000000000 --- a/UITests/Sources/__Snapshots__/Application/en-GB-iPad-9th-generation.inviteUsersInRoomExistingMembers-1.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4380762f5d2ecfebe278deaad65dbc1e4a5b40ff5936db9425bb0087b6701cb7 -size 95503 diff --git a/UITests/Sources/__Snapshots__/Application/en-GB-iPad-9th-generation.startChat.png b/UITests/Sources/__Snapshots__/Application/en-GB-iPad-9th-generation.startChat.png index ecc8cacec..7d1cc429f 100644 --- a/UITests/Sources/__Snapshots__/Application/en-GB-iPad-9th-generation.startChat.png +++ b/UITests/Sources/__Snapshots__/Application/en-GB-iPad-9th-generation.startChat.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5bbc69959f073b4d5c074cc3effa07912bcbefaa43b0ed775457491806e16e3c -size 103078 +oid sha256:29f6060cadaac23418128a8f087c96a9a5940a6d486b7fd9ed79de9e8a04b4c2 +size 75467 diff --git a/UITests/Sources/__Snapshots__/Application/en-GB-iPad-9th-generation.userSessionScreen-1.png b/UITests/Sources/__Snapshots__/Application/en-GB-iPad-9th-generation.userSessionScreen-1.png index 90e458918..397ae7f99 100644 --- a/UITests/Sources/__Snapshots__/Application/en-GB-iPad-9th-generation.userSessionScreen-1.png +++ b/UITests/Sources/__Snapshots__/Application/en-GB-iPad-9th-generation.userSessionScreen-1.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:16ae9dccde16a9758470b038971566c6a60c5553bb0feca695bdb2acd1476f08 -size 305283 +oid sha256:96c8f8de1bdb21df00fad7b6cc1c619852eec6c12a36ffb171293e9a268e8e81 +size 312945 diff --git a/UITests/Sources/__Snapshots__/Application/en-GB-iPad-9th-generation.userSessionScreen-2.png b/UITests/Sources/__Snapshots__/Application/en-GB-iPad-9th-generation.userSessionScreen-2.png index dc0dca55b..6271603a5 100644 --- a/UITests/Sources/__Snapshots__/Application/en-GB-iPad-9th-generation.userSessionScreen-2.png +++ b/UITests/Sources/__Snapshots__/Application/en-GB-iPad-9th-generation.userSessionScreen-2.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:866d817857162852477d835ccecab7b6af398316e6aad9278e7bb09d3d263161 -size 434773 +oid sha256:8554038e51fae2d8a89610e4e8749142a403e2628d3cf60b4f158189fe04771e +size 441950 diff --git a/UITests/Sources/__Snapshots__/Application/en-GB-iPad-9th-generation.userSessionScreen-3.png b/UITests/Sources/__Snapshots__/Application/en-GB-iPad-9th-generation.userSessionScreen-3.png index 0d9c4d1df..2a752c4fa 100644 --- a/UITests/Sources/__Snapshots__/Application/en-GB-iPad-9th-generation.userSessionScreen-3.png +++ b/UITests/Sources/__Snapshots__/Application/en-GB-iPad-9th-generation.userSessionScreen-3.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3b28aaf9d6d73d52b8e4f43e8246b7a471b5d9ea6ee716baf466f9b3f62c5cc6 -size 676109 +oid sha256:2d08bd0a8f3f914a6de2714cc5b82b6d5f054ab1b15b28dbb8c9ecb6302bc574 +size 684885 diff --git a/UITests/Sources/__Snapshots__/Application/en-GB-iPhone-14.inviteUsers-1.png b/UITests/Sources/__Snapshots__/Application/en-GB-iPhone-14.inviteUsers-1.png deleted file mode 100644 index b2880b367..000000000 --- a/UITests/Sources/__Snapshots__/Application/en-GB-iPhone-14.inviteUsers-1.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:abc0d764c74dbf4a1424bfb0ebf22d30e481a395efedca489f4eea01d4dcf561 -size 125908 diff --git a/UITests/Sources/__Snapshots__/Application/en-GB-iPhone-14.inviteUsers.png b/UITests/Sources/__Snapshots__/Application/en-GB-iPhone-14.inviteUsers.png index ab9aa3568..931e57bc1 100644 --- a/UITests/Sources/__Snapshots__/Application/en-GB-iPhone-14.inviteUsers.png +++ b/UITests/Sources/__Snapshots__/Application/en-GB-iPhone-14.inviteUsers.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3376eeab4934aabd2520774eb489ab40d81cfa803de49851141cd05bf54662ae -size 111448 +oid sha256:edecf983c382b401860ce0958cdce8f0b45aec90c60b6a019d4a82e342b8ecbb +size 65453 diff --git a/UITests/Sources/__Snapshots__/Application/en-GB-iPhone-14.inviteUsersInRoom-1.png b/UITests/Sources/__Snapshots__/Application/en-GB-iPhone-14.inviteUsersInRoom-1.png deleted file mode 100644 index ff668a2b0..000000000 --- a/UITests/Sources/__Snapshots__/Application/en-GB-iPhone-14.inviteUsersInRoom-1.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:95fa99a10f32b2bd70ed9f547c6b5e6904799d197653376f61155fc7a737245f -size 128675 diff --git a/UITests/Sources/__Snapshots__/Application/en-GB-iPhone-14.inviteUsersInRoomExistingMembers-1.png b/UITests/Sources/__Snapshots__/Application/en-GB-iPhone-14.inviteUsersInRoomExistingMembers-1.png deleted file mode 100644 index 03deaa3bb..000000000 --- a/UITests/Sources/__Snapshots__/Application/en-GB-iPhone-14.inviteUsersInRoomExistingMembers-1.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:5d49688083fd896d8f60a437a657e5b047b9e2eea5746910380e141b961ff739 -size 111576 diff --git a/UITests/Sources/__Snapshots__/Application/en-GB-iPhone-14.startChat.png b/UITests/Sources/__Snapshots__/Application/en-GB-iPhone-14.startChat.png index c4a4a3ac8..dc1853bef 100644 --- a/UITests/Sources/__Snapshots__/Application/en-GB-iPhone-14.startChat.png +++ b/UITests/Sources/__Snapshots__/Application/en-GB-iPhone-14.startChat.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:da7ed614bc6c00574ab7959a351c070b84ee17ecaaf6afa7bfe1ee50b22faf86 -size 125770 +oid sha256:17803f2dadd6f43345c867e595143d52cf25637e8da9490f72b5de0b74c5d7d9 +size 83582 diff --git a/UITests/Sources/__Snapshots__/Application/en-GB-iPhone-14.userSessionScreen-1.png b/UITests/Sources/__Snapshots__/Application/en-GB-iPhone-14.userSessionScreen-1.png index f50dc75e0..3cbc31091 100644 --- a/UITests/Sources/__Snapshots__/Application/en-GB-iPhone-14.userSessionScreen-1.png +++ b/UITests/Sources/__Snapshots__/Application/en-GB-iPhone-14.userSessionScreen-1.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d6f94120d6bbdfb19d471f9fb6156443d6e94892485e79d31afc88d018626140 -size 289879 +oid sha256:891aaa3e12fd0999b5c588ebecba20fdf655252eaf622d44ef3e1b241d20fd3f +size 300038 diff --git a/UITests/Sources/__Snapshots__/Application/en-GB-iPhone-14.userSessionScreen-2.png b/UITests/Sources/__Snapshots__/Application/en-GB-iPhone-14.userSessionScreen-2.png index 458ea5df4..36e027ad3 100644 --- a/UITests/Sources/__Snapshots__/Application/en-GB-iPhone-14.userSessionScreen-2.png +++ b/UITests/Sources/__Snapshots__/Application/en-GB-iPhone-14.userSessionScreen-2.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:fc3acdd6447da268ef587596cbce65a616b1b77d70ef1d503fdf9389e4292340 -size 328755 +oid sha256:20ba7a152fddecb6d0fc8f850f16ef4badaee1671aef57babd2a7ada30f45f1e +size 328845 diff --git a/UITests/Sources/__Snapshots__/Application/en-GB-iPhone-14.userSessionScreen-3.png b/UITests/Sources/__Snapshots__/Application/en-GB-iPhone-14.userSessionScreen-3.png index e49ddfd97..00d94f73b 100644 --- a/UITests/Sources/__Snapshots__/Application/en-GB-iPhone-14.userSessionScreen-3.png +++ b/UITests/Sources/__Snapshots__/Application/en-GB-iPhone-14.userSessionScreen-3.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7b1f41291345f1454f9bf773e4efb7b96f370a68185710796a5f3675d4e672d2 -size 768475 +oid sha256:71a804e4f618655897c9e34d214a909f101f1592ae89efa1fded5d1456045f57 +size 768561 diff --git a/UITests/Sources/__Snapshots__/Application/pseudo-iPad-9th-generation.inviteUsers-1.png b/UITests/Sources/__Snapshots__/Application/pseudo-iPad-9th-generation.inviteUsers-1.png deleted file mode 100644 index 0ebd8b630..000000000 --- a/UITests/Sources/__Snapshots__/Application/pseudo-iPad-9th-generation.inviteUsers-1.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4e2ea9cb24ceeccbc3989999704a5ecd8c07b35cd81b00945407c37730b9b361 -size 109114 diff --git a/UITests/Sources/__Snapshots__/Application/pseudo-iPad-9th-generation.inviteUsers.png b/UITests/Sources/__Snapshots__/Application/pseudo-iPad-9th-generation.inviteUsers.png index 29d87a6d5..d2133f345 100644 --- a/UITests/Sources/__Snapshots__/Application/pseudo-iPad-9th-generation.inviteUsers.png +++ b/UITests/Sources/__Snapshots__/Application/pseudo-iPad-9th-generation.inviteUsers.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:baf46e031df4ca38e250d145ba251d5dff0151521173faa72144fd04e30ae541 -size 99541 +oid sha256:ce5b799ce30d00f674e1b2275b2053348d122e1aa47c23543347d515109aabe0 +size 65938 diff --git a/UITests/Sources/__Snapshots__/Application/pseudo-iPad-9th-generation.inviteUsersInRoom-1.png b/UITests/Sources/__Snapshots__/Application/pseudo-iPad-9th-generation.inviteUsersInRoom-1.png deleted file mode 100644 index b82726d0c..000000000 --- a/UITests/Sources/__Snapshots__/Application/pseudo-iPad-9th-generation.inviteUsersInRoom-1.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9c0f3eed1c78e3b734c787fa6d47ea09347303dc132289b993a72c9d823332e0 -size 111097 diff --git a/UITests/Sources/__Snapshots__/Application/pseudo-iPad-9th-generation.inviteUsersInRoomExistingMembers-1.png b/UITests/Sources/__Snapshots__/Application/pseudo-iPad-9th-generation.inviteUsersInRoomExistingMembers-1.png deleted file mode 100644 index ba1fc2496..000000000 --- a/UITests/Sources/__Snapshots__/Application/pseudo-iPad-9th-generation.inviteUsersInRoomExistingMembers-1.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:1fcde6c5a8783a21d5f0683b850fbb8c95c88bc6e3ca5994fd4e769e92ccec36 -size 102638 diff --git a/UITests/Sources/__Snapshots__/Application/pseudo-iPad-9th-generation.startChat.png b/UITests/Sources/__Snapshots__/Application/pseudo-iPad-9th-generation.startChat.png index cbb0dc92b..4f113747a 100644 --- a/UITests/Sources/__Snapshots__/Application/pseudo-iPad-9th-generation.startChat.png +++ b/UITests/Sources/__Snapshots__/Application/pseudo-iPad-9th-generation.startChat.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2c1d4c40717ad7c7291009d0458b4737d93d77c404e7f88cf9445148f9bcbfe9 -size 111160 +oid sha256:51ae2109aa903b1bb3cd92b1a37a65089ff35df1edf08dbcd0d109c557179506 +size 80801 diff --git a/UITests/Sources/__Snapshots__/Application/pseudo-iPad-9th-generation.userSessionScreen-1.png b/UITests/Sources/__Snapshots__/Application/pseudo-iPad-9th-generation.userSessionScreen-1.png index eb1ce81f6..7fd8ab3d2 100644 --- a/UITests/Sources/__Snapshots__/Application/pseudo-iPad-9th-generation.userSessionScreen-1.png +++ b/UITests/Sources/__Snapshots__/Application/pseudo-iPad-9th-generation.userSessionScreen-1.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4b7bf00a08472a91457ede8325bd9593c54292f595d9132cc7df9065132ffd40 -size 306877 +oid sha256:fd9376c0ec4981d72e8e495ccfdb3634fec84b1771d41e1e0ba25432ded73f70 +size 314081 diff --git a/UITests/Sources/__Snapshots__/Application/pseudo-iPad-9th-generation.userSessionScreen-2.png b/UITests/Sources/__Snapshots__/Application/pseudo-iPad-9th-generation.userSessionScreen-2.png index db5c06bcc..fef86aa92 100644 --- a/UITests/Sources/__Snapshots__/Application/pseudo-iPad-9th-generation.userSessionScreen-2.png +++ b/UITests/Sources/__Snapshots__/Application/pseudo-iPad-9th-generation.userSessionScreen-2.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ae69d26c82628764ae5254f4a180a95fb2a69abe2cc113ee4c4f03531b3b221a -size 436822 +oid sha256:8dceab7ecd50de0ec4c4dbbdaa7484a2dc142b418477b03d7cd5ebe60de2e7e8 +size 443420 diff --git a/UITests/Sources/__Snapshots__/Application/pseudo-iPad-9th-generation.userSessionScreen-3.png b/UITests/Sources/__Snapshots__/Application/pseudo-iPad-9th-generation.userSessionScreen-3.png index f00e4c817..1d9d049ea 100644 --- a/UITests/Sources/__Snapshots__/Application/pseudo-iPad-9th-generation.userSessionScreen-3.png +++ b/UITests/Sources/__Snapshots__/Application/pseudo-iPad-9th-generation.userSessionScreen-3.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1a34893148141ab6925e4875d90404a46085f5440dac2a1a694861b18d75a7a4 -size 709895 +oid sha256:c17fade4c6cc4422518b6aa1c4ceac9a6c62f957c40f89877da6b95bc1180153 +size 719640 diff --git a/UITests/Sources/__Snapshots__/Application/pseudo-iPhone-14.inviteUsers-1.png b/UITests/Sources/__Snapshots__/Application/pseudo-iPhone-14.inviteUsers-1.png deleted file mode 100644 index 3f5df20fa..000000000 --- a/UITests/Sources/__Snapshots__/Application/pseudo-iPhone-14.inviteUsers-1.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:23889a3f018de42f1d43672488a99d82c379356b93c64e2b464e6dc8e301579d -size 132289 diff --git a/UITests/Sources/__Snapshots__/Application/pseudo-iPhone-14.inviteUsers.png b/UITests/Sources/__Snapshots__/Application/pseudo-iPhone-14.inviteUsers.png index 417aad55f..9606e76cd 100644 --- a/UITests/Sources/__Snapshots__/Application/pseudo-iPhone-14.inviteUsers.png +++ b/UITests/Sources/__Snapshots__/Application/pseudo-iPhone-14.inviteUsers.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b95cf05146a78f0300fce52071c14cd1a7e22ac77b73242b6979fe6742029da1 -size 113297 +oid sha256:8b0dda025aa247f05356fced96f8a1c54323fcd31bf1e40b0780b6d3049d7c51 +size 69006 diff --git a/UITests/Sources/__Snapshots__/Application/pseudo-iPhone-14.inviteUsersInRoom-1.png b/UITests/Sources/__Snapshots__/Application/pseudo-iPhone-14.inviteUsersInRoom-1.png deleted file mode 100644 index 2881b195d..000000000 --- a/UITests/Sources/__Snapshots__/Application/pseudo-iPhone-14.inviteUsersInRoom-1.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:683d1b9b97925e38e99eb1484b1b60fb8dd8a966a843338f2930d46b37869f63 -size 134683 diff --git a/UITests/Sources/__Snapshots__/Application/pseudo-iPhone-14.inviteUsersInRoomExistingMembers-1.png b/UITests/Sources/__Snapshots__/Application/pseudo-iPhone-14.inviteUsersInRoomExistingMembers-1.png deleted file mode 100644 index fe74e57d2..000000000 --- a/UITests/Sources/__Snapshots__/Application/pseudo-iPhone-14.inviteUsersInRoomExistingMembers-1.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ec7e0d2f7a28ea69ce3f79abe7b46044626a38b9d2d9c36a2d9a4a9b27c53327 -size 116295 diff --git a/UITests/Sources/__Snapshots__/Application/pseudo-iPhone-14.startChat.png b/UITests/Sources/__Snapshots__/Application/pseudo-iPhone-14.startChat.png index d096cb52d..b7dbd552b 100644 --- a/UITests/Sources/__Snapshots__/Application/pseudo-iPhone-14.startChat.png +++ b/UITests/Sources/__Snapshots__/Application/pseudo-iPhone-14.startChat.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:facd745ec4ffb852684629d6d2a3283a04e5de896e2e87952b6a4e9e487ea82b -size 135609 +oid sha256:a04e624edc5379a57499b3136f533da3ce13fbe36a76de0f04951bd0f7693227 +size 91906 diff --git a/UITests/Sources/__Snapshots__/Application/pseudo-iPhone-14.userSessionScreen-1.png b/UITests/Sources/__Snapshots__/Application/pseudo-iPhone-14.userSessionScreen-1.png index 56ddc41a6..3b21bc6cc 100644 --- a/UITests/Sources/__Snapshots__/Application/pseudo-iPhone-14.userSessionScreen-1.png +++ b/UITests/Sources/__Snapshots__/Application/pseudo-iPhone-14.userSessionScreen-1.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1f2700dece05d0b7bba51d1b71b31a4eba6b64ef622c83badd55ae30822c5deb -size 292792 +oid sha256:14e6f0339d1a5b4bfe56ee9f0c5a6b409cac25f1fffcb733c6674f73c42a9bd7 +size 301482 diff --git a/UITests/Sources/__Snapshots__/Application/pseudo-iPhone-14.userSessionScreen-2.png b/UITests/Sources/__Snapshots__/Application/pseudo-iPhone-14.userSessionScreen-2.png index ff6b65a14..2dd932e6f 100644 --- a/UITests/Sources/__Snapshots__/Application/pseudo-iPhone-14.userSessionScreen-2.png +++ b/UITests/Sources/__Snapshots__/Application/pseudo-iPhone-14.userSessionScreen-2.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7659f0d89a39f3a88863af13afb8e5f84112b9a20043d7baaea51720f39c5995 -size 313332 +oid sha256:8ccd7c2b6588ebf5f5867a3e5978d66742ac3a99652a89748eab6a9cdca80bfd +size 313225 diff --git a/UITests/Sources/__Snapshots__/Application/pseudo-iPhone-14.userSessionScreen-3.png b/UITests/Sources/__Snapshots__/Application/pseudo-iPhone-14.userSessionScreen-3.png index f875b8f90..7db222bb8 100644 --- a/UITests/Sources/__Snapshots__/Application/pseudo-iPhone-14.userSessionScreen-3.png +++ b/UITests/Sources/__Snapshots__/Application/pseudo-iPhone-14.userSessionScreen-3.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:90f8ed29ba91fd9d39da5211c1fc86c819015f1287db78f7b3405a408a3528bc -size 809223 +oid sha256:116b1934f9d3bb70bb2f39101a3ec7e71bfe6bcbddfd1c9a0859209a8ed84454 +size 809116 diff --git a/UnitTests/Sources/HomeScreenViewModelTests.swift b/UnitTests/Sources/HomeScreenViewModelTests.swift index 1dfaf37d0..b1737f664 100644 --- a/UnitTests/Sources/HomeScreenViewModelTests.swift +++ b/UnitTests/Sources/HomeScreenViewModelTests.swift @@ -28,7 +28,6 @@ class HomeScreenViewModelTests: XCTestCase { var roomSummaryProvider: RoomSummaryProviderMock! override func setUpWithError() throws { - ServiceLocator.shared.settings.roomListFiltersEnabled = true cancellables.removeAll() roomSummaryProvider = RoomSummaryProviderMock(.init(state: .loaded(.mockRooms))) clientProxy = ClientProxyMock(.init(userID: "@mock:client.com", roomSummaryProvider: roomSummaryProvider)) @@ -179,7 +178,6 @@ class HomeScreenViewModelTests: XCTestCase { try await Task.sleep(for: .milliseconds(100)) XCTAssertEqual(roomSummaryProvider.roomListPublisher.value.first?.name, "Prelude to Foundation") XCTAssertEqual(roomSummaryProvider.roomListPublisher.value.count, 1) - XCTAssertFalse(context.viewState.shouldShowFilters) } func testFiltersEmptyState() async throws { diff --git a/UnitTests/Sources/InviteUsersViewModelTests.swift b/UnitTests/Sources/InviteUsersViewModelTests.swift index 086eb0e07..26cc85880 100644 --- a/UnitTests/Sources/InviteUsersViewModelTests.swift +++ b/UnitTests/Sources/InviteUsersViewModelTests.swift @@ -96,13 +96,11 @@ class InviteUsersScreenViewModelTests: XCTestCase { private func setupWithRoomType(roomType: InviteUsersScreenRoomType) { let usersSubject = CurrentValueSubject<[UserProfileProxy], Never>([]) userDiscoveryService = UserDiscoveryServiceMock() - userDiscoveryService.fetchSuggestionsReturnValue = .success([]) userDiscoveryService.searchProfilesWithReturnValue = .success([]) usersSubject.send([]) let viewModel = InviteUsersScreenViewModel(selectedUsers: usersSubject.asCurrentValuePublisher(), roomType: roomType, mediaProvider: MockMediaProvider(), userDiscoveryService: userDiscoveryService, - appSettings: ServiceLocator.shared.settings, userIndicatorController: UserIndicatorControllerMock()) viewModel.state.usersSection = .init(type: .suggestions, users: [.mockAlice, .mockBob, .mockCharlie]) self.viewModel = viewModel diff --git a/UnitTests/Sources/StartChatViewModelTests.swift b/UnitTests/Sources/StartChatViewModelTests.swift index 3d23909ae..0b4e8d5c5 100644 --- a/UnitTests/Sources/StartChatViewModelTests.swift +++ b/UnitTests/Sources/StartChatViewModelTests.swift @@ -31,13 +31,11 @@ class StartChatScreenViewModelTests: XCTestCase { override func setUpWithError() throws { clientProxy = .init(.init(userID: "")) userDiscoveryService = UserDiscoveryServiceMock() - userDiscoveryService.fetchSuggestionsReturnValue = .success([]) userDiscoveryService.searchProfilesWithReturnValue = .success([]) let userSession = MockUserSession(clientProxy: clientProxy, mediaProvider: MockMediaProvider(), voiceMessageMediaManager: VoiceMessageMediaManagerMock()) viewModel = StartChatScreenViewModel(userSession: userSession, - userSuggestionsEnabled: true, analytics: ServiceLocator.shared.analytics, userIndicatorController: UserIndicatorControllerMock(), userDiscoveryService: userDiscoveryService) @@ -46,7 +44,6 @@ class StartChatScreenViewModelTests: XCTestCase { func testQueryShowingNoResults() async throws { await search(query: "A") XCTAssertEqual(context.viewState.usersSection.type, .suggestions) - XCTAssertTrue(userDiscoveryService.fetchSuggestionsCalled) await search(query: "AA") XCTAssertEqual(context.viewState.usersSection.type, .suggestions) diff --git a/changelog.d/pr-2541.feature b/changelog.d/pr-2541.feature new file mode 100644 index 000000000..a27edd5c4 --- /dev/null +++ b/changelog.d/pr-2541.feature @@ -0,0 +1 @@ +The features: Filters, Mark as Read/Unread/Favourites are now available. \ No newline at end of file