Bug Fix - Home: tapping on an unread room on home page takes you to the wrong room

#1304
This commit is contained in:
Giom Foret 2017-06-22 15:17:24 +02:00
parent e9728d17e7
commit 6a84a04cfa
2 changed files with 9 additions and 4 deletions

View file

@ -240,9 +240,11 @@
{
if (self.delegate)
{
id<MXKRecentCellDataStoring> cellData = [recentsDataSource cellDataAtIndexPath:[NSIndexPath indexPathForRow:indexPath.item inSection:collectionView.tag]];
RoomCollectionViewCell *roomCollectionViewCell = (RoomCollectionViewCell*)[collectionView cellForItemAtIndexPath:indexPath];
[self.delegate recentListViewController:self didSelectRoom:cellData.roomSummary.roomId inMatrixSession:cellData.roomSummary.room.mxSession];
id<MXKRecentCellDataStoring> renderedCellData = (id<MXKRecentCellDataStoring>)roomCollectionViewCell.renderedCellData;
[self.delegate recentListViewController:self didSelectRoom:renderedCellData.roomSummary.roomId inMatrixSession:renderedCellData.roomSummary.room.mxSession];
}
// Hide the keyboard when user select a room

View file

@ -54,8 +54,6 @@
- (void)layoutSubviews
{
[super layoutSubviews];
}
- (void)render:(MXKCellData *)cellData
@ -137,6 +135,11 @@
}
}
- (MXKCellData*)renderedCellData
{
return roomCellData;
}
+ (CGFloat)heightForCellData:(MXKCellData *)cellData withMaximumWidth:(CGFloat)maxWidth
{
// The height is fixed