mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-21 09:02:44 +02:00
BaseBubbleCell: Add default support for RoomCellURLPreviewDisplayable.
This commit is contained in:
@@ -178,6 +178,10 @@ class BaseBubbleCell: MXKRoomBubbleTableViewCell, BaseBubbleCellType {
|
||||
if let timestampDisplayable = self as? TimestampDisplayable {
|
||||
timestampDisplayable.removeTimestampView()
|
||||
}
|
||||
|
||||
if let urlPreviewDisplayable = self as? RoomCellURLPreviewDisplayable {
|
||||
urlPreviewDisplayable.removeURLPreviewView()
|
||||
}
|
||||
}
|
||||
|
||||
override func render(_ cellData: MXKCellData!) {
|
||||
@@ -234,6 +238,17 @@ class BaseBubbleCell: MXKRoomBubbleTableViewCell, BaseBubbleCellType {
|
||||
self.bubbleCellContentView = bubbleCellContentView
|
||||
}
|
||||
|
||||
// MARK: - RoomCellURLPreviewDisplayable
|
||||
// Cannot use default implementation with ObjC protocol, if self conforms to BubbleCellReadReceiptsDisplayable method below will be used
|
||||
|
||||
func addURLPreviewView(_ urlPreviewView: UIView) {
|
||||
self.bubbleCellContentView?.addURLPreviewView(urlPreviewView)
|
||||
}
|
||||
|
||||
func removeURLPreviewView() {
|
||||
self.bubbleCellContentView?.removeURLPreviewView()
|
||||
}
|
||||
|
||||
// MARK: - BubbleCellReadReceiptsDisplayable
|
||||
// Cannot use default implementation with ObjC protocol, if self conforms to BubbleCellReadReceiptsDisplayable method below will be used
|
||||
|
||||
|
||||
Reference in New Issue
Block a user