Fixed https://github.com/vector-im/vector-ios/issues/246: universal link on an unjoined room + an event iD is not properly managed

This commit is contained in:
manuroe
2016-04-26 17:10:06 +02:00
parent f91ddac917
commit bbe7bcaf8e
3 changed files with 20 additions and 0 deletions
@@ -1623,6 +1623,7 @@
if (succeed)
{
NSString *eventId = roomPreviewData.eventId;
roomPreviewData = nil;
// Enable back the text input
@@ -1640,6 +1641,15 @@
[self refreshRoomTitle];
[self refreshRoomInputToolbar];
// If an event was specified, replace the datasource by a non live datasource showing the event
if (eventId)
{
RoomDataSource *roomDataSource = [[RoomDataSource alloc] initWithRoomId:self.roomDataSource.roomId initialEventId:eventId andMatrixSession:self.mainSession];
[roomDataSource finalizeInitialization];
[self displayRoom:roomDataSource];
}
}
}];