diff --git a/Riot/Modules/Room/RoomInfo/RoomInfoCoordinator.swift b/Riot/Modules/Room/RoomInfo/RoomInfoCoordinator.swift index c570c150fb..343770f406 100644 --- a/Riot/Modules/Room/RoomInfo/RoomInfoCoordinator.swift +++ b/Riot/Modules/Room/RoomInfo/RoomInfoCoordinator.swift @@ -247,4 +247,8 @@ extension RoomInfoCoordinator: RoomSettingsViewControllerDelegate { func roomSettingsViewController(_ controller: RoomSettingsViewController!, didReplaceRoomWithReplacementId newRoomId: String!) { self.delegate?.roomInfoCoordinator(self, didReplaceRoomWithReplacementId: newRoomId) } + + func roomSettingsViewControllerDidLeaveRoom(_ controller: RoomSettingsViewController!) { + self.delegate?.roomInfoCoordinatorDidLeaveRoom(self) + } } diff --git a/Riot/Modules/Room/RoomViewController.m b/Riot/Modules/Room/RoomViewController.m index ce5b17ba6e..5cf6f33db1 100644 --- a/Riot/Modules/Room/RoomViewController.m +++ b/Riot/Modules/Room/RoomViewController.m @@ -2260,12 +2260,7 @@ - (void)leaveRoom - (void)notifyDelegateOnLeaveRoomIfNecessary { if (self.delegate) { - // Leaving room often triggers multiple events, incl local delegate callbacks as well as global notifications, - // which may lead to multiple identical UI changes (navigating to home, displaying notification etc). - // To avoid this, as soon as we notify the delegate the first time, we nilify it, preventing future messages - // from being passed along, assuming that after leaving a room there is nothing else to communicate to the delegate. [self.delegate roomViewControllerDidLeaveRoom:self]; - self.delegate = nil; } else { diff --git a/Riot/Modules/Room/Settings/RoomSettingsViewController.h b/Riot/Modules/Room/Settings/RoomSettingsViewController.h index dddb1d5ec0..81f6892428 100644 --- a/Riot/Modules/Room/Settings/RoomSettingsViewController.h +++ b/Riot/Modules/Room/Settings/RoomSettingsViewController.h @@ -69,6 +69,8 @@ typedef enum : NSUInteger { @protocol RoomSettingsViewControllerDelegate +- (void)roomSettingsViewControllerDidLeaveRoom:(RoomSettingsViewController *)controller; + - (void)roomSettingsViewController:(RoomSettingsViewController *)controller didReplaceRoomWithReplacementId:(NSString *)newRoomId; - (void)roomSettingsViewControllerDidCancel:(RoomSettingsViewController *)controller; diff --git a/Riot/Modules/Room/Settings/RoomSettingsViewController.m b/Riot/Modules/Room/Settings/RoomSettingsViewController.m index be9001347c..c1daca59dd 100644 --- a/Riot/Modules/Room/Settings/RoomSettingsViewController.m +++ b/Riot/Modules/Room/Settings/RoomSettingsViewController.m @@ -3667,7 +3667,11 @@ - (void)onLeave:(id)sender [self startActivityIndicator]; [self->mxRoom leave:^{ - [[LegacyAppDelegate theDelegate] restoreInitialDisplay:nil]; + if (self.delegate) { + [self.delegate roomSettingsViewControllerDidLeaveRoom:self]; + } else { + [[LegacyAppDelegate theDelegate] restoreInitialDisplay:nil]; + } } failure:^(NSError *error) { diff --git a/Riot/Modules/Spaces/SpaceMembers/SpaceMembersCoordinator.swift b/Riot/Modules/Spaces/SpaceMembers/SpaceMembersCoordinator.swift index e1fcc1f9db..4b16e5f818 100644 --- a/Riot/Modules/Spaces/SpaceMembers/SpaceMembersCoordinator.swift +++ b/Riot/Modules/Spaces/SpaceMembers/SpaceMembersCoordinator.swift @@ -172,7 +172,7 @@ extension SpaceMembersCoordinator: SpaceMemberListCoordinatorDelegate { return } - let coordinator = ContactsPickerCoordinator(session: self.parameters.session, room: spaceRoom, initialSearchText: nil, actualParticipants: nil, invitedParticipants: nil, userParticipant: nil, navigationRouter: self.navigationRouter) + let coordinator = ContactsPickerCoordinator(session: self.parameters.session, room: spaceRoom, initialSearchText: nil, actualParticipants: nil, invitedParticipants: nil, userParticipant: nil) coordinator.delegate = self coordinator.start() self.childCoordinators.append(coordinator) diff --git a/Riot/Modules/Spaces/SpaceRoomList/ExploreRoom/SpaceExploreRoomCoordinator.swift b/Riot/Modules/Spaces/SpaceRoomList/ExploreRoom/SpaceExploreRoomCoordinator.swift index b547a991da..45a5faa71d 100644 --- a/Riot/Modules/Spaces/SpaceRoomList/ExploreRoom/SpaceExploreRoomCoordinator.swift +++ b/Riot/Modules/Spaces/SpaceRoomList/ExploreRoom/SpaceExploreRoomCoordinator.swift @@ -94,6 +94,10 @@ extension SpaceExploreRoomCoordinator: SpaceExploreRoomViewModelCoordinatorDeleg } } + func spaceExploreRoomViewModel(_ coordinator: SpaceExploreRoomViewModelType, didJoin item: SpaceExploreRoomListItemViewData) { + self.delegate?.spaceExploreRoomCoordinator(self, didJoin: item) + } + private func showAddRoomMissingPermissionAlert() { let alert = UIAlertController(title: VectorL10n.spacesAddRoom, message: VectorL10n.spacesAddRoomMissingPermissionMessage, preferredStyle: .alert) alert.addAction(UIAlertAction(title: VectorL10n.ok, style: .default, handler: nil)) diff --git a/Riot/Modules/Spaces/SpaceRoomList/ExploreRoom/SpaceExploreRoomCoordinatorType.swift b/Riot/Modules/Spaces/SpaceRoomList/ExploreRoom/SpaceExploreRoomCoordinatorType.swift index fe9403f4d2..dbb244a4fb 100644 --- a/Riot/Modules/Spaces/SpaceRoomList/ExploreRoom/SpaceExploreRoomCoordinatorType.swift +++ b/Riot/Modules/Spaces/SpaceRoomList/ExploreRoom/SpaceExploreRoomCoordinatorType.swift @@ -24,6 +24,7 @@ protocol SpaceExploreRoomCoordinatorDelegate: AnyObject { func spaceExploreRoomCoordinatorDidAddRoom(_ coordinator: SpaceExploreRoomCoordinatorType) func spaceExploreRoomCoordinator(_ coordinator: SpaceExploreRoomCoordinatorType, openSettingsOf item: SpaceExploreRoomListItemViewData) func spaceExploreRoomCoordinator(_ coordinator: SpaceExploreRoomCoordinatorType, inviteTo item: SpaceExploreRoomListItemViewData) + func spaceExploreRoomCoordinator(_ coordinator: SpaceExploreRoomCoordinatorType, didJoin item: SpaceExploreRoomListItemViewData) } /// `SpaceExploreRoomCoordinatorType` is a protocol describing a Coordinator that handle key backup setup passphrase navigation flow. diff --git a/Riot/Modules/Spaces/SpaceRoomList/ExploreRoom/SpaceExploreRoomViewModel.swift b/Riot/Modules/Spaces/SpaceRoomList/ExploreRoom/SpaceExploreRoomViewModel.swift index 9a48e4a790..3a37331182 100644 --- a/Riot/Modules/Spaces/SpaceRoomList/ExploreRoom/SpaceExploreRoomViewModel.swift +++ b/Riot/Modules/Spaces/SpaceRoomList/ExploreRoom/SpaceExploreRoomViewModel.swift @@ -118,7 +118,7 @@ final class SpaceExploreRoomViewModel: SpaceExploreRoomViewModelType { case .removeChild(let item): removeChild(withRoomId: item.childInfo.childRoomId) case .join(let item): - joinRoom(withRoomId: item.childInfo.childRoomId) + joinRoom(with: item) case .joinOpenedSpace: self.joinSpace() } @@ -134,7 +134,7 @@ final class SpaceExploreRoomViewModel: SpaceExploreRoomViewModelType { canSendSpaceStateEvents = false } - let roomSummary = session.roomSummary(withRoomId: itemData.childInfo.childRoomId) + let roomSummary = session.room(withRoomId: itemData.childInfo.childRoomId)?.summary let isJoined = roomSummary?.isJoined ?? false if itemData.childInfo.roomType == .space { @@ -292,13 +292,14 @@ final class SpaceExploreRoomViewModel: SpaceExploreRoomViewModelType { } } - private func joinRoom(withRoomId roomId: String) { + private func joinRoom(with itemData: SpaceExploreRoomListItemViewData) { self.update(viewState: .loading) - self.session.joinRoom(roomId) { [weak self] response in + self.session.joinRoom(itemData.childInfo.childRoomId) { [weak self] response in guard let self = self else { return } switch response { case .success: self.update(viewState: .loaded(self.filteredItemDataList, self.hasMore)) + self.coordinatorDelegate?.spaceExploreRoomViewModel(self, didJoin: itemData) case .failure(let error): self.update(viewState: .error(error)) } diff --git a/Riot/Modules/Spaces/SpaceRoomList/ExploreRoom/SpaceExploreRoomViewModelType.swift b/Riot/Modules/Spaces/SpaceRoomList/ExploreRoom/SpaceExploreRoomViewModelType.swift index 3f461563db..c545c6a54f 100644 --- a/Riot/Modules/Spaces/SpaceRoomList/ExploreRoom/SpaceExploreRoomViewModelType.swift +++ b/Riot/Modules/Spaces/SpaceRoomList/ExploreRoom/SpaceExploreRoomViewModelType.swift @@ -28,6 +28,7 @@ protocol SpaceExploreRoomViewModelCoordinatorDelegate: AnyObject { func spaceExploreRoomViewModelDidAddRoom(_ viewModel: SpaceExploreRoomViewModelType) func spaceExploreRoomViewModel(_ viewModel: SpaceExploreRoomViewModelType, openSettingsOf item: SpaceExploreRoomListItemViewData) func spaceExploreRoomViewModel(_ viewModel: SpaceExploreRoomViewModelType, inviteTo item: SpaceExploreRoomListItemViewData) + func spaceExploreRoomViewModel(_ viewModel: SpaceExploreRoomViewModelType, didJoin item: SpaceExploreRoomListItemViewData) } /// Protocol describing the view model used by `SpaceExploreRoomViewController` diff --git a/Riot/Modules/Spaces/SpaceRoomList/ExploreRoomCoordinator.swift b/Riot/Modules/Spaces/SpaceRoomList/ExploreRoomCoordinator.swift index 39cc9114ea..71f5607494 100644 --- a/Riot/Modules/Spaces/SpaceRoomList/ExploreRoomCoordinator.swift +++ b/Riot/Modules/Spaces/SpaceRoomList/ExploreRoomCoordinator.swift @@ -105,7 +105,7 @@ final class ExploreRoomCoordinator: NSObject, ExploreRoomCoordinatorType { self.remove(childCoordinator: currentCoordinator) } - let summary = self.session.roomSummary(withRoomId: item.childInfo.childRoomId) + let summary = self.session.room(withRoomId: item.childInfo.childRoomId)?.summary let isJoined = summary?.isJoined ?? false if isJoined { @@ -291,6 +291,14 @@ extension ExploreRoomCoordinator: SpaceExploreRoomCoordinatorDelegate { func spaceExploreRoomCoordinator(_ coordinator: SpaceExploreRoomCoordinatorType, inviteTo item: SpaceExploreRoomListItemViewData) { self.presentInviteScreen(forRoomWithId: item.childInfo.childRoomId) } + + func spaceExploreRoomCoordinator(_ coordinator: SpaceExploreRoomCoordinatorType, didJoin item: SpaceExploreRoomListItemViewData) { + if item.childInfo.roomType == .space { + self.pushSpace(with: item) + } else { + self.navigateTo(roomWith: item.childInfo.childRoomId) + } + } } // MARK: - ShowSpaceChildRoomDetailCoordinator diff --git a/Riot/Modules/Spaces/SpaceRoomList/SpaceChildRoomDetail/SpaceChildRoomDetailViewModel.swift b/Riot/Modules/Spaces/SpaceRoomList/SpaceChildRoomDetail/SpaceChildRoomDetailViewModel.swift index c5989e23b6..d64efb9a0a 100644 --- a/Riot/Modules/Spaces/SpaceRoomList/SpaceChildRoomDetail/SpaceChildRoomDetailViewModel.swift +++ b/Riot/Modules/Spaces/SpaceRoomList/SpaceChildRoomDetail/SpaceChildRoomDetailViewModel.swift @@ -30,7 +30,7 @@ final class SpaceChildRoomDetailViewModel: SpaceChildRoomDetailViewModelType { private var currentOperation: MXHTTPOperation? private var userDisplayName: String? private var isRoomJoined: Bool { - let summary = self.session.roomSummary(withRoomId: self.childInfo.childRoomId) + let summary = self.session.room(withRoomId: self.childInfo.childRoomId)?.summary return summary?.isJoined ?? false } diff --git a/RiotSwiftUI/Modules/Room/RoomAccess/RoomAccessTypeChooser/View/RoomAccessTypeChooser.swift b/RiotSwiftUI/Modules/Room/RoomAccess/RoomAccessTypeChooser/View/RoomAccessTypeChooser.swift index 8288e5280b..d77b1ac59b 100644 --- a/RiotSwiftUI/Modules/Room/RoomAccess/RoomAccessTypeChooser/View/RoomAccessTypeChooser.swift +++ b/RiotSwiftUI/Modules/Room/RoomAccess/RoomAccessTypeChooser/View/RoomAccessTypeChooser.swift @@ -34,6 +34,7 @@ struct RoomAccessTypeChooser: View { listContent .waitOverlay(show: viewModel.isLoading, message: viewModel.waitingMessage, allowUserInteraction: false) .navigationTitle(VectorL10n.roomAccessSettingsScreenNavTitle) + .background(theme.colors.background.ignoresSafeArea()) .toolbar { ToolbarItem(placement: .cancellationAction) { Button(VectorL10n.cancel) { @@ -77,7 +78,7 @@ struct RoomAccessTypeChooser: View { .padding(.top, 30) } .padding(.horizontal) - }.background(theme.colors.background) + } } } diff --git a/RiotSwiftUI/Modules/Spaces/AddRoomSelector/View/AddRoomSelector.swift b/RiotSwiftUI/Modules/Spaces/AddRoomSelector/View/AddRoomSelector.swift index 194b60a443..b56a0642d9 100644 --- a/RiotSwiftUI/Modules/Spaces/AddRoomSelector/View/AddRoomSelector.swift +++ b/RiotSwiftUI/Modules/Spaces/AddRoomSelector/View/AddRoomSelector.swift @@ -31,7 +31,7 @@ struct AddRoomSelector: View { var body: some View { MatrixItemChooser(viewModel: viewModel, listBottomPadding: nil) - .background(theme.colors.background) + .background(theme.colors.background.ignoresSafeArea()) .navigationBarItems(leading: cancelButton, trailing: doneButton) .accentColor(theme.colors.accent) } diff --git a/RiotSwiftUI/Modules/Spaces/MatrixItemChooser/MatrixItemChooserModels.swift b/RiotSwiftUI/Modules/Spaces/MatrixItemChooser/MatrixItemChooserModels.swift index 17cabbcd75..b82422529c 100644 --- a/RiotSwiftUI/Modules/Spaces/MatrixItemChooser/MatrixItemChooserModels.swift +++ b/RiotSwiftUI/Modules/Spaces/MatrixItemChooser/MatrixItemChooserModels.swift @@ -49,10 +49,20 @@ enum MatrixListItemDataType { } struct MatrixListItemSectionData { - let id = UUID().uuidString + let id: String let title: String? let infoText: String? let items: [MatrixListItemData] + + init(id: String = UUID().uuidString, + title: String? = nil, + infoText: String? = nil, + items: [MatrixListItemData] = []) { + self.id = id + self.title = title + self.infoText = infoText + self.items = items + } } extension MatrixListItemSectionData: Identifiable, Equatable {} diff --git a/RiotSwiftUI/Modules/Spaces/MatrixItemChooser/MockMatrixItemChooserScreenState.swift b/RiotSwiftUI/Modules/Spaces/MatrixItemChooser/MockMatrixItemChooserScreenState.swift index 9f28ce0d86..a8f1d729b1 100644 --- a/RiotSwiftUI/Modules/Spaces/MatrixItemChooser/MockMatrixItemChooserScreenState.swift +++ b/RiotSwiftUI/Modules/Spaces/MatrixItemChooser/MockMatrixItemChooserScreenState.swift @@ -38,7 +38,7 @@ enum MockMatrixItemChooserScreenState: MockScreenState, CaseIterable { let service: MockMatrixItemChooserService switch self { case .noItems: - service = MockMatrixItemChooserService(type: .room, sections: [MatrixListItemSectionData(title: nil, infoText: nil, items: [])]) + service = MockMatrixItemChooserService(type: .room, sections: [MatrixListItemSectionData()]) case .items: service = MockMatrixItemChooserService() case .selectedItems: diff --git a/RiotSwiftUI/Modules/Spaces/MatrixItemChooser/Service/MatrixSDK/MatrixItemChooserRoomAncestorsDataSource.swift b/RiotSwiftUI/Modules/Spaces/MatrixItemChooser/Service/MatrixSDK/MatrixItemChooserRoomAncestorsDataSource.swift index 3d781dec82..aee17961b0 100644 --- a/RiotSwiftUI/Modules/Spaces/MatrixItemChooser/Service/MatrixSDK/MatrixItemChooserRoomAncestorsDataSource.swift +++ b/RiotSwiftUI/Modules/Spaces/MatrixItemChooser/Service/MatrixSDK/MatrixItemChooserRoomAncestorsDataSource.swift @@ -29,7 +29,7 @@ class MatrixItemChooserRoomAncestorsDataSource: MatrixItemChooserDataSource { let ancestorsIds = session.spaceService.ancestorsPerRoomId[roomId] ?? [] completion(Result(catching: { return [ - MatrixListItemSectionData(title: VectorL10n.roomAccessSpaceChooserKnownSpacesSection(session.room(withRoomId: roomId)?.displayName ?? ""), infoText: nil, items: ancestorsIds.compactMap { spaceId in + MatrixListItemSectionData(title: VectorL10n.roomAccessSpaceChooserKnownSpacesSection(session.room(withRoomId: roomId)?.displayName ?? ""), items: ancestorsIds.compactMap { spaceId in guard let space = session.spaceService.getSpace(withId: spaceId) else { return nil } diff --git a/RiotSwiftUI/Modules/Spaces/MatrixItemChooser/Service/MatrixSDK/MatrixItemChooserRoomDirectParentsDataSource.swift b/RiotSwiftUI/Modules/Spaces/MatrixItemChooser/Service/MatrixSDK/MatrixItemChooserRoomDirectParentsDataSource.swift index a5bbad42ae..95e2923564 100644 --- a/RiotSwiftUI/Modules/Spaces/MatrixItemChooser/Service/MatrixSDK/MatrixItemChooserRoomDirectParentsDataSource.swift +++ b/RiotSwiftUI/Modules/Spaces/MatrixItemChooser/Service/MatrixSDK/MatrixItemChooserRoomDirectParentsDataSource.swift @@ -45,7 +45,7 @@ class MatrixItemChooserRoomDirectParentsDataSource: MatrixItemChooserDataSource completion(Result(catching: { return [ - MatrixListItemSectionData(title: VectorL10n.roomAccessSpaceChooserKnownSpacesSection(session.room(withRoomId: roomId)?.displayName ?? ""), infoText: nil, items: ancestorsIds.compactMap { spaceId in + MatrixListItemSectionData(title: VectorL10n.roomAccessSpaceChooserKnownSpacesSection(session.room(withRoomId: roomId)?.displayName ?? ""), items: ancestorsIds.compactMap { spaceId in guard let space = session.spaceService.getSpace(withId: spaceId) else { return nil } diff --git a/RiotSwiftUI/Modules/Spaces/MatrixItemChooser/Service/MatrixSDK/MatrixItemChooserRoomRestrictedAllowedParentsDataSource.swift b/RiotSwiftUI/Modules/Spaces/MatrixItemChooser/Service/MatrixSDK/MatrixItemChooserRoomRestrictedAllowedParentsDataSource.swift index db31241b53..4f4443c44e 100644 --- a/RiotSwiftUI/Modules/Spaces/MatrixItemChooser/Service/MatrixSDK/MatrixItemChooserRoomRestrictedAllowedParentsDataSource.swift +++ b/RiotSwiftUI/Modules/Spaces/MatrixItemChooser/Service/MatrixSDK/MatrixItemChooserRoomRestrictedAllowedParentsDataSource.swift @@ -50,7 +50,6 @@ class MatrixItemChooserRoomRestrictedAllowedParentsDataSource: MatrixItemChooser var sections = [ MatrixListItemSectionData( title: VectorL10n.roomAccessSpaceChooserKnownSpacesSection(room.displayName ?? ""), - infoText: nil, items: ancestorsId.compactMap { spaceId in guard let space = session.spaceService.getSpace(withId: spaceId) else { return nil diff --git a/RiotSwiftUI/Modules/Spaces/MatrixItemChooser/Service/MatrixSDK/MatrixItemChooserRoomsDataSource.swift b/RiotSwiftUI/Modules/Spaces/MatrixItemChooser/Service/MatrixSDK/MatrixItemChooserRoomsDataSource.swift index 1cfe4b29d8..5906cdba1b 100644 --- a/RiotSwiftUI/Modules/Spaces/MatrixItemChooser/Service/MatrixSDK/MatrixItemChooserRoomsDataSource.swift +++ b/RiotSwiftUI/Modules/Spaces/MatrixItemChooser/Service/MatrixSDK/MatrixItemChooserRoomsDataSource.swift @@ -22,7 +22,7 @@ class MatrixItemChooserRoomsDataSource: MatrixItemChooserDataSource { func sections(with session: MXSession, completion: @escaping (Result<[MatrixListItemSectionData], Error>) -> Void) { completion(Result(catching: { [ - MatrixListItemSectionData(title: nil, infoText: nil, items: session.rooms.compactMap { room in + MatrixListItemSectionData(items: session.rooms.compactMap { room in if room.summary.roomType == .space || room.isDirect { return nil } diff --git a/RiotSwiftUI/Modules/Spaces/MatrixItemChooser/Service/MatrixSDK/MatrixItemChooserService.swift b/RiotSwiftUI/Modules/Spaces/MatrixItemChooser/Service/MatrixSDK/MatrixItemChooserService.swift index 8307b4dee4..61406eac99 100644 --- a/RiotSwiftUI/Modules/Spaces/MatrixItemChooser/Service/MatrixSDK/MatrixItemChooserService.swift +++ b/RiotSwiftUI/Modules/Spaces/MatrixItemChooser/Service/MatrixSDK/MatrixItemChooserService.swift @@ -136,7 +136,7 @@ class MatrixItemChooserService: MatrixItemChooserServiceProtocol { itemsProcessor.isItemIncluded($0) && ($0.id.lowercased().contains(lowercasedSearchText) || ($0.displayName ?? "").lowercased().contains(lowercasedSearchText)) } } - newSections.append(MatrixListItemSectionData(title: section.title, infoText: section.infoText, items: items)) + newSections.append(MatrixListItemSectionData(id: section.id, title: section.title, infoText: section.infoText, items: items)) } return newSections diff --git a/RiotSwiftUI/Modules/Spaces/MatrixItemChooser/Service/MatrixSDK/MatrixItemChooserUsersDataSource.swift b/RiotSwiftUI/Modules/Spaces/MatrixItemChooser/Service/MatrixSDK/MatrixItemChooserUsersDataSource.swift index 2512fa8528..3194c37d79 100644 --- a/RiotSwiftUI/Modules/Spaces/MatrixItemChooser/Service/MatrixSDK/MatrixItemChooserUsersDataSource.swift +++ b/RiotSwiftUI/Modules/Spaces/MatrixItemChooser/Service/MatrixSDK/MatrixItemChooserUsersDataSource.swift @@ -22,7 +22,7 @@ class MatrixItemChooserUsersDataSource: MatrixItemChooserDataSource { func sections(with session: MXSession, completion: @escaping (Result<[MatrixListItemSectionData], Error>) -> Void) { completion(Result(catching: { [ - MatrixListItemSectionData(title: nil, infoText: nil, items: session.users().map { user in + MatrixListItemSectionData(items: session.users().map { user in MatrixListItemData(mxUser: user) }) ] diff --git a/RiotSwiftUI/Modules/Spaces/SpaceCreation/SpaceCreationEmailInvites/View/SpaceCreationEmailInvites.swift b/RiotSwiftUI/Modules/Spaces/SpaceCreation/SpaceCreationEmailInvites/View/SpaceCreationEmailInvites.swift index 630847a136..06873c460f 100644 --- a/RiotSwiftUI/Modules/Spaces/SpaceCreation/SpaceCreationEmailInvites/View/SpaceCreationEmailInvites.swift +++ b/RiotSwiftUI/Modules/Spaces/SpaceCreation/SpaceCreationEmailInvites/View/SpaceCreationEmailInvites.swift @@ -43,7 +43,7 @@ struct SpaceCreationEmailInvites: View { .animation(.easeInOut(duration: 0.2), value: viewModel.viewState.loading) .waitOverlay(show: viewModel.viewState.loading) } - .background(theme.colors.background) + .background(theme.colors.background.ignoresSafeArea()) .navigationBarHidden(true) } diff --git a/RiotSwiftUI/Modules/Spaces/SpaceCreation/SpaceCreationMatrixItemChooser/View/SpaceCreationMatrixItemChooser.swift b/RiotSwiftUI/Modules/Spaces/SpaceCreation/SpaceCreationMatrixItemChooser/View/SpaceCreationMatrixItemChooser.swift index 426e1f4ad8..c8c9b5042e 100644 --- a/RiotSwiftUI/Modules/Spaces/SpaceCreation/SpaceCreationMatrixItemChooser/View/SpaceCreationMatrixItemChooser.swift +++ b/RiotSwiftUI/Modules/Spaces/SpaceCreation/SpaceCreationMatrixItemChooser/View/SpaceCreationMatrixItemChooser.swift @@ -39,7 +39,7 @@ struct SpaceCreationMatrixItemChooser: View { } mainView } - .background(theme.colors.background) + .background(theme.colors.background.ignoresSafeArea()) .navigationBarHidden(true) } diff --git a/RiotSwiftUI/Modules/Spaces/SpaceCreation/SpaceCreationMenu/View/SpaceCreationMenu.swift b/RiotSwiftUI/Modules/Spaces/SpaceCreation/SpaceCreationMenu/View/SpaceCreationMenu.swift index 68bc776c72..ff05feb6ea 100644 --- a/RiotSwiftUI/Modules/Spaces/SpaceCreation/SpaceCreationMenu/View/SpaceCreationMenu.swift +++ b/RiotSwiftUI/Modules/Spaces/SpaceCreation/SpaceCreationMenu/View/SpaceCreationMenu.swift @@ -59,7 +59,7 @@ struct SpaceCreationMenu: View { } .padding(EdgeInsets(top: 0, leading: 16, bottom: 24, trailing: 16)) } - .background(theme.colors.background) + .background(theme.colors.background.ignoresSafeArea()) } @ViewBuilder diff --git a/RiotSwiftUI/Modules/Spaces/SpaceCreation/SpaceCreationPostProcess/View/SpaceCreationPostProcess.swift b/RiotSwiftUI/Modules/Spaces/SpaceCreation/SpaceCreationPostProcess/View/SpaceCreationPostProcess.swift index 47bc0bf7f9..a5583b0af1 100644 --- a/RiotSwiftUI/Modules/Spaces/SpaceCreation/SpaceCreationPostProcess/View/SpaceCreationPostProcess.swift +++ b/RiotSwiftUI/Modules/Spaces/SpaceCreation/SpaceCreationPostProcess/View/SpaceCreationPostProcess.swift @@ -43,7 +43,7 @@ struct SpaceCreationPostProcess: View { .animation(.easeIn(duration: 0.2), value: viewModel.viewState.errorCount) .padding(EdgeInsets(top: 0, leading: 16, bottom: 24, trailing: 16)) .navigationBarHidden(true) - .background(theme.colors.background) + .background(theme.colors.background.ignoresSafeArea()) .frame(maxHeight: .infinity) .onAppear() { viewModel.send(viewAction: .runTasks) diff --git a/RiotSwiftUI/Modules/Spaces/SpaceCreation/SpaceCreationRooms/View/SpaceCreationRooms.swift b/RiotSwiftUI/Modules/Spaces/SpaceCreation/SpaceCreationRooms/View/SpaceCreationRooms.swift index bb31ce7708..f24c23594a 100644 --- a/RiotSwiftUI/Modules/Spaces/SpaceCreation/SpaceCreationRooms/View/SpaceCreationRooms.swift +++ b/RiotSwiftUI/Modules/Spaces/SpaceCreation/SpaceCreationRooms/View/SpaceCreationRooms.swift @@ -40,7 +40,7 @@ struct SpaceCreationRooms: View { } mainView } - .background(theme.colors.background) + .background(theme.colors.background.ignoresSafeArea()) .navigationBarHidden(true) } diff --git a/RiotSwiftUI/Modules/Spaces/SpaceCreation/SpaceCreationSettings/View/SpaceCreationSettings.swift b/RiotSwiftUI/Modules/Spaces/SpaceCreation/SpaceCreationSettings/View/SpaceCreationSettings.swift index bca8671edc..6af5eee400 100644 --- a/RiotSwiftUI/Modules/Spaces/SpaceCreation/SpaceCreationSettings/View/SpaceCreationSettings.swift +++ b/RiotSwiftUI/Modules/Spaces/SpaceCreation/SpaceCreationSettings/View/SpaceCreationSettings.swift @@ -42,7 +42,7 @@ struct SpaceCreationSettings: View { } mainView } - .background(theme.colors.background) + .background(theme.colors.background.ignoresSafeArea()) .navigationBarHidden(true) } diff --git a/RiotSwiftUI/Modules/Spaces/SpaceSettings/SpaceSettings/Coordinator/SpaceSettingsCoordinator.swift b/RiotSwiftUI/Modules/Spaces/SpaceSettings/SpaceSettings/Coordinator/SpaceSettingsCoordinator.swift index 5f1949f128..0199bb8a54 100644 --- a/RiotSwiftUI/Modules/Spaces/SpaceSettings/SpaceSettings/Coordinator/SpaceSettingsCoordinator.swift +++ b/RiotSwiftUI/Modules/Spaces/SpaceSettings/SpaceSettings/Coordinator/SpaceSettingsCoordinator.swift @@ -52,7 +52,9 @@ final class SpaceSettingsCoordinator: Coordinator, Presentable { let view = SpaceSettings(viewModel: viewModel.context) .addDependency(AvatarService.instantiate(mediaManager: parameters.session.mediaManager)) spaceSettingsViewModel = viewModel - spaceSettingsHostingController = VectorHostingController(rootView: view) + let controller = VectorHostingController(rootView: view) + controller.enableNavigationBarScrollEdgesAppearance = true + spaceSettingsHostingController = controller } // MARK: - Public diff --git a/RiotSwiftUI/Modules/Spaces/SpaceSettings/SpaceSettings/View/SpaceSettings.swift b/RiotSwiftUI/Modules/Spaces/SpaceSettings/SpaceSettings/View/SpaceSettings.swift index 6332303f17..c026ae3580 100644 --- a/RiotSwiftUI/Modules/Spaces/SpaceSettings/SpaceSettings/View/SpaceSettings.swift +++ b/RiotSwiftUI/Modules/Spaces/SpaceSettings/SpaceSettings/View/SpaceSettings.swift @@ -40,7 +40,7 @@ struct SpaceSettings: View { .padding(.bottom, 32) } } - .background(theme.colors.navigation) + .background(theme.colors.navigation.ignoresSafeArea()) .waitOverlay(show: viewModel.viewState.isLoading, allowUserInteraction: false) .ignoresSafeArea(.container, edges: .bottom) .frame(maxHeight: .infinity) diff --git a/changelog.d/5757.bugfix b/changelog.d/5757.bugfix new file mode 100644 index 0000000000..64b57e0391 --- /dev/null +++ b/changelog.d/5757.bugfix @@ -0,0 +1 @@ +Selection impossible when filtering in add room screen. \ No newline at end of file