Ensure DisabledRoomInputToolbarView is used. Fix previewing rooms. Fix favourited DMs in Home.

This commit is contained in:
Doug
2021-11-03 10:18:27 +00:00
parent 24bbfca511
commit 6497cfd8e2
8 changed files with 22 additions and 13 deletions
+10 -1
View File
@@ -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