diff --git a/Riot/ViewController/HomeViewController.m b/Riot/ViewController/HomeViewController.m index 1570e310b..1bb6685bd 100644 --- a/Riot/ViewController/HomeViewController.m +++ b/Riot/ViewController/HomeViewController.m @@ -240,11 +240,9 @@ { if (self.delegate) { - RoomCollectionViewCell *roomCollectionViewCell = (RoomCollectionViewCell*)[collectionView cellForItemAtIndexPath:indexPath]; + id cellData = [recentsDataSource cellDataAtIndexPath:[NSIndexPath indexPathForRow:indexPath.item inSection:collectionView.tag]]; - id renderedCellData = (id)roomCollectionViewCell.renderedCellData; - - [self.delegate recentListViewController:self didSelectRoom:renderedCellData.roomSummary.roomId inMatrixSession:renderedCellData.roomSummary.room.mxSession]; + [self.delegate recentListViewController:self didSelectRoom:cellData.roomSummary.roomId inMatrixSession:cellData.roomSummary.room.mxSession]; } // Hide the keyboard when user select a room diff --git a/Riot/Views/RoomList/RoomCollectionViewCell.m b/Riot/Views/RoomList/RoomCollectionViewCell.m index f37cbcb68..bdfcc1fc3 100644 --- a/Riot/Views/RoomList/RoomCollectionViewCell.m +++ b/Riot/Views/RoomList/RoomCollectionViewCell.m @@ -54,6 +54,8 @@ - (void)layoutSubviews { [super layoutSubviews]; + + } - (void)render:(MXKCellData *)cellData @@ -135,11 +137,6 @@ } } -- (MXKCellData*)renderedCellData -{ - return roomCellData; -} - + (CGFloat)heightForCellData:(MXKCellData *)cellData withMaximumWidth:(CGFloat)maxWidth { // The height is fixed