mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-05-04 23:17:43 +02:00
BubbleRoomTimelineStyle: Handle selected style.
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user