BubbleRoomTimelineStyle: Handle selected style.

This commit is contained in:
SBiOSoftWhare
2022-01-18 20:49:13 +01:00
parent 0c9fa83def
commit 09e932438a
2 changed files with 17 additions and 0 deletions
@@ -43,4 +43,19 @@ class BubbleRoomTimelineStyle: RoomTimelineStyle {
return false
}
func applySelectedStyleIfNeeded(toCell cell: MXKRoomBubbleTableViewCell, cellData: RoomBubbleCellData) {
// Check whether the selected event belongs to this bubble
let selectedComponentIndex = cellData.selectedComponentIndex
if selectedComponentIndex != NSNotFound {
cell.selectComponent(UInt(selectedComponentIndex),
showEditButton: false,
showTimestamp: false)
self.cellDecorator.addTimestampLabel(toCell: cell, cellData: cellData)
} else {
cell.blurred = true
}
}
}