diff --git a/Riot/Modules/Common/Recents/RecentsViewController.m b/Riot/Modules/Common/Recents/RecentsViewController.m index f47f08a9d..882cf6fe6 100644 --- a/Riot/Modules/Common/Recents/RecentsViewController.m +++ b/Riot/Modules/Common/Recents/RecentsViewController.m @@ -1996,7 +1996,7 @@ NSString *const RecentsViewControllerDataReadyNotification = @"RecentsViewContro } // Check whether the user has already joined the selected public room - if ([self.recentsDataSource.publicRoomsDirectoryDataSource.mxSession roomWithRoomId:publicRoom.roomId]) + if ([self.recentsDataSource.publicRoomsDirectoryDataSource.mxSession isJoinedOnRoom:publicRoom.roomId]) { // Open the public room [self showRoomWithRoomId:publicRoom.roomId diff --git a/Riot/Modules/Common/Recents/Service/MatrixSDK/RecentsListService.swift b/Riot/Modules/Common/Recents/Service/MatrixSDK/RecentsListService.swift index cda8f716d..266a55360 100644 --- a/Riot/Modules/Common/Recents/Service/MatrixSDK/RecentsListService.swift +++ b/Riot/Modules/Common/Recents/Service/MatrixSDK/RecentsListService.swift @@ -427,7 +427,7 @@ public class RecentsListService: NSObject, RecentsListServiceProtocol { private func updateDirectFetcher(_ fetcher: MXRoomListDataFetcher, for mode: RecentsDataSourceMode) { switch mode { case .home: - fetcher.fetchOptions.filterOptions.notDataTypes = [.invited, .lowPriority] + fetcher.fetchOptions.filterOptions.notDataTypes = [.invited, .favorited, .lowPriority] case .people: fetcher.fetchOptions.filterOptions.notDataTypes = [.lowPriority] default: diff --git a/Riot/Modules/GlobalSearch/Rooms/DirectoryViewController.m b/Riot/Modules/GlobalSearch/Rooms/DirectoryViewController.m index 2f6e791d7..254831046 100644 --- a/Riot/Modules/GlobalSearch/Rooms/DirectoryViewController.m +++ b/Riot/Modules/GlobalSearch/Rooms/DirectoryViewController.m @@ -190,7 +190,7 @@ MXPublicRoom *publicRoom = [dataSource roomAtIndexPath:indexPath]; // Check whether the user has already joined the selected public room - if ([dataSource.mxSession roomWithRoomId:publicRoom.roomId]) + if ([dataSource.mxSession isJoinedOnRoom:publicRoom.roomId]) { // Open the public room. [self showRoomWithId:publicRoom.roomId inMatrixSession:dataSource.mxSession]; diff --git a/Riot/Modules/Room/RoomCoordinator.swift b/Riot/Modules/Room/RoomCoordinator.swift index dd3ca7d2f..5c8c0a46b 100644 --- a/Riot/Modules/Room/RoomCoordinator.swift +++ b/Riot/Modules/Room/RoomCoordinator.swift @@ -92,7 +92,9 @@ final class RoomCoordinator: NSObject, RoomCoordinatorProtocol { // Detect when view controller has been dismissed by gesture when presented modally (not in full screen). self.roomViewController.presentationController?.delegate = self - if let eventId = self.selectedEventId { + if let previewData = self.parameters.previewData { + self.loadRoomPreview(withData: previewData, completion: completion) + } else if let eventId = self.selectedEventId { self.loadRoom(withId: self.parameters.roomId, and: eventId, completion: completion) } else { self.loadRoom(withId: self.parameters.roomId, completion: completion) @@ -178,6 +180,13 @@ final class RoomCoordinator: NSObject, RoomCoordinatorProtocol { completion?() } } + + private func loadRoomPreview(withData previewData: RoomPreviewData, completion: (() -> Void)?) { + + self.roomViewController.displayRoomPreview(previewData) + + completion?() + } } // MARK: - RoomIdentifiable diff --git a/Riot/Modules/Room/RoomViewController.m b/Riot/Modules/Room/RoomViewController.m index 5b4ad0c2b..072f4f81b 100644 --- a/Riot/Modules/Room/RoomViewController.m +++ b/Riot/Modules/Room/RoomViewController.m @@ -1084,16 +1084,12 @@ const NSTimeInterval kResizeComposerAnimationDuration = .05; if (self.roomDataSource) { - // Restore tool bar view and room activities view if none - if (!self.inputToolbarView) - { - [self updateRoomInputToolbarViewClassIfNeeded]; - - [self refreshRoomInputToolbar]; - - self.inputToolbarView.hidden = (self.roomDataSource.state != MXKDataSourceStateReady); - } + // Update the input toolbar class and update the layout + [self updateRoomInputToolbarViewClassIfNeeded]; + self.inputToolbarView.hidden = (self.roomDataSource.state != MXKDataSourceStateReady); + + // Restore room activities view if none if (!self.activitiesView) { // And the extra area @@ -1178,6 +1174,7 @@ const NSTimeInterval kResizeComposerAnimationDuration = .05; } [self updateInputToolBarViewHeight]; + [self refreshRoomInputToolbar]; } } diff --git a/changelog.d/5079.bugfix b/changelog.d/5079.bugfix new file mode 100644 index 000000000..0f6b2baf8 --- /dev/null +++ b/changelog.d/5079.bugfix @@ -0,0 +1 @@ +Message Composer: Ensure there is no text view when the user isn't allowed to send messages. \ No newline at end of file diff --git a/changelog.d/5081.bugfix b/changelog.d/5081.bugfix new file mode 100644 index 000000000..545779610 --- /dev/null +++ b/changelog.d/5081.bugfix @@ -0,0 +1 @@ +Home: Fix bug where favourited DM would be shown in both Favourites and People section. \ No newline at end of file diff --git a/changelog.d/5083.bugfix b/changelog.d/5083.bugfix new file mode 100644 index 000000000..12a915cc6 --- /dev/null +++ b/changelog.d/5083.bugfix @@ -0,0 +1 @@ +Room Previews: Fix room previews not loading. \ No newline at end of file