|
|
|
@ -1025,11 +1025,12 @@ final class VisibleMessageCell: MessageCell, TappableLabelDelegate {
|
|
|
|
|
|
|
|
|
|
static func getMaxWidth(for cellViewModel: MessageViewModel, includingOppositeGutter: Bool = true) -> CGFloat {
|
|
|
|
|
let screen: CGRect = UIScreen.main.bounds
|
|
|
|
|
let width: CGFloat = UIDevice.current.isIPad ? screen.width * 0.75 : screen.width
|
|
|
|
|
let oppositeEdgePadding: CGFloat = (includingOppositeGutter ? gutterSize : contactThreadHSpacing)
|
|
|
|
|
|
|
|
|
|
switch cellViewModel.variant {
|
|
|
|
|
case .standardOutgoing:
|
|
|
|
|
return (screen.width - contactThreadHSpacing - oppositeEdgePadding)
|
|
|
|
|
return (width - contactThreadHSpacing - oppositeEdgePadding)
|
|
|
|
|
|
|
|
|
|
case .standardIncoming, .standardIncomingDeleted:
|
|
|
|
|
let isGroupThread = (
|
|
|
|
@ -1038,7 +1039,7 @@ final class VisibleMessageCell: MessageCell, TappableLabelDelegate {
|
|
|
|
|
)
|
|
|
|
|
let leftGutterSize = (isGroupThread ? leftGutterSize : contactThreadHSpacing)
|
|
|
|
|
|
|
|
|
|
return (screen.width - leftGutterSize - oppositeEdgePadding)
|
|
|
|
|
return (width - leftGutterSize - oppositeEdgePadding)
|
|
|
|
|
|
|
|
|
|
default: preconditionFailure()
|
|
|
|
|
}
|
|
|
|
|