SizableBaseRoomCell: Handle read marker view.

This commit is contained in:
SBiOSoftWhare
2022-02-17 19:22:00 +01:00
parent 421b0327f4
commit 41bdfbcf8d
@@ -156,6 +156,16 @@ class SizableBaseRoomCell: BaseRoomCell, SizableBaseRoomCellType {
height+=urlPreviewHeight
}
// Add read marker view height if needed
// Note: We cannot check if readMarkerView property is set here. Extra non needed height can be added
if sizingView is RoomCellReadMarkerDisplayable,
let roomBubbleCellData = cellData as? RoomBubbleCellData, let firstBubbleComponent =
roomBubbleCellData.getFirstBubbleComponentWithDisplay(),
let eventId = firstBubbleComponent.event.eventId, let room = roomBubbleCellData.mxSession.room(withRoomId: roomBubbleCellData.roomId), let readMarkerEventId = room.accountData.readMarkerEventId, eventId == readMarkerEventId {
height+=PlainRoomCellLayoutConstants.readMarkerViewHeight
}
return height
}
}