mirror of
https://github.com/vector-im/element-ios.git
synced 2024-09-28 23:32:41 +00:00
RecentsViewController: Handle RoomsDirectoryCoordinatorBridgePresenter did select room id or alias.
This commit is contained in:
parent
257fe62cf0
commit
c8f6bddd08
3 changed files with 18 additions and 1 deletions
|
@ -195,6 +195,7 @@
|
|||
"room_recents_join_room" = "Join room";
|
||||
"room_recents_join_room_title" = "Join a room";
|
||||
"room_recents_join_room_prompt" = "Type a room id or a room alias";
|
||||
"room_recents_unknown_room_error_message" = "Can't find this room. Make sure it exists";
|
||||
|
||||
// People tab
|
||||
"people_invites_section" = "INVITES";
|
||||
|
|
|
@ -3354,6 +3354,10 @@ internal enum VectorL10n {
|
|||
internal static var roomRecentsStartChatWith: String {
|
||||
return VectorL10n.tr("Vector", "room_recents_start_chat_with")
|
||||
}
|
||||
/// Can't find this room. Make sure it exists
|
||||
internal static var roomRecentsUnknownRoomErrorMessage: String {
|
||||
return VectorL10n.tr("Vector", "room_recents_unknown_room_error_message")
|
||||
}
|
||||
/// This room has been replaced and is no longer active.
|
||||
internal static var roomReplacementInformation: String {
|
||||
return VectorL10n.tr("Vector", "room_replacement_information")
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue