RecentsViewController: Handle RoomsDirectoryCoordinatorBridgePresenter did select room id or alias.

This commit is contained in:
SBiOSoftWhare
2021-06-14 16:12:53 +02:00
parent 92f4549d54
commit f192baf9d9
3 changed files with 18 additions and 1 deletions
@@ -2175,7 +2175,19 @@
- (void)roomsDirectoryCoordinatorBridgePresenterDelegate:(RoomsDirectoryCoordinatorBridgePresenter *)coordinatorBridgePresenter didSelectRoomWithIdOrAlias:(NSString * _Nonnull)roomIdOrAlias
{
// TODO: Implement
MXRoom *room = [self.mainSession vc_roomWithIdOrAlias:roomIdOrAlias];
if (room)
{
[coordinatorBridgePresenter dismissWithAnimated:YES completion:^{
[[AppDelegate theDelegate] showRoom:room.roomId andEventId:nil withMatrixSession:self.mainSession restoreInitialDisplay:NO];
}];
coordinatorBridgePresenter = nil;
}
else
{
[[AppDelegate theDelegate] showAlertWithTitle:[NSBundle mxk_localizedStringForKey:@"error"] message:NSLocalizedStringFromTable(@"room_recents_unknown_room_error_message", @"Vector", nil)];
}
}
@end