BubbleRoomTimelineCellDecorator: Update tempary views management.

This commit is contained in:
SBiOSoftWhare
2022-02-08 11:16:38 +01:00
parent 987015f94b
commit 2e30f3fba1
@@ -96,13 +96,13 @@ class BubbleRoomTimelineCellDecorator: PlainRoomTimelineCellDecorator {
override func addReactionView(_ reactionsView: BubbleReactionsView,
toCell cell: MXKRoomBubbleTableViewCell, cellData: RoomBubbleCellData, contentViewPositionY: CGFloat, upperDecorationView: UIView?) {
cell.addTemporarySubview(reactionsView)
if let reactionsDisplayable = cell as? BubbleCellReactionsDisplayable {
reactionsDisplayable.addReactionsView(reactionsView)
return
}
cell.addTemporarySubview(reactionsView)
reactionsView.translatesAutoresizingMaskIntoConstraints = false
let cellContentView = cell.contentView
@@ -221,11 +221,11 @@ class BubbleRoomTimelineCellDecorator: PlainRoomTimelineCellDecorator {
contentViewPositionY: CGFloat,
upperDecorationView: UIView?) {
cell.addTemporarySubview(threadSummaryView)
if let threadSummaryDisplayable = cell as? BubbleCellThreadSummaryDisplayable {
threadSummaryDisplayable.addThreadSummaryView(threadSummaryView)
} else {
cell.addTemporarySubview(threadSummaryView)
threadSummaryView.translatesAutoresizingMaskIntoConstraints = false
let cellContentView = cell.contentView