Include URL previews in addVerticalWhitespaceToString:forEvent: and remove heightForCellData:withMaximumWidth: from the various TextMsgBubbleCell subclasses.

Use the bubble cell data's available width when sizing URL previews and update the defaultAvailableWidth and reducedWidthThreshold accordingly.
This commit is contained in:
Doug
2021-09-23 17:30:24 +01:00
parent e800a2ec42
commit ac3b2c1677
8 changed files with 33 additions and 81 deletions
@@ -37,9 +37,9 @@ class URLPreviewView: UIView, NibLoadable, Themable {
static let reducedWidth: CGFloat = 230
/// The availableWidth value that the XIB file is designed against.
static let defaultAvailableWidth: CGFloat = 375
static let defaultAvailableWidth: CGFloat = 340
/// The threshold value for available width that triggers the view to use a reducedWidth
static let reducedWidthThreshold: CGFloat = 320
static let reducedWidthThreshold: CGFloat = 285
}
// MARK: - Properties