BubbleRoomTimelineStyle: Handle selected style.

This commit is contained in:
SBiOSoftWhare
2022-01-18 20:49:13 +01:00
parent 51c7c67397
commit 46a793a93c
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
}
}
}
@@ -23,6 +23,8 @@ protocol RoomTimelineCellDecorator {
func addTimestampLabelIfNeeded(toCell cell: MXKRoomBubbleTableViewCell,
cellData: RoomBubbleCellData)
func addTimestampLabel(toCell cell: MXKRoomBubbleTableViewCell, cellData: RoomBubbleCellData)
func addURLPreviewView(_ urlPreviewView: URLPreviewView,
toCell cell: MXKRoomBubbleTableViewCell,
cellData: RoomBubbleCellData,