|
|
|
@ -599,7 +599,7 @@ final class VisibleMessageCell: MessageCell, UITextViewDelegate, BodyTextViewDel
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private func updateBubbleViewCorners() {
|
|
|
|
|
let cornersToRound: UIRectCorner = getCornersToRound()
|
|
|
|
|
let cornersToRound: UIRectCorner = .allCorners
|
|
|
|
|
|
|
|
|
|
bubbleBackgroundView.layer.cornerRadius = VisibleMessageCell.largeCornerRadius
|
|
|
|
|
bubbleBackgroundView.layer.maskedCorners = getCornerMask(from: cornersToRound)
|
|
|
|
@ -807,25 +807,6 @@ final class VisibleMessageCell: MessageCell, UITextViewDelegate, BodyTextViewDel
|
|
|
|
|
|
|
|
|
|
// MARK: - Convenience
|
|
|
|
|
|
|
|
|
|
private func getCornersToRound() -> UIRectCorner {
|
|
|
|
|
return .allCorners
|
|
|
|
|
|
|
|
|
|
// FIXME: Leave the code here just in case we want this again.
|
|
|
|
|
// guard viewModel?.isOnlyMessageInCluster == false else { return .allCorners }
|
|
|
|
|
//
|
|
|
|
|
// let direction: Direction = (viewModel?.variant == .standardOutgoing ? .outgoing : .incoming)
|
|
|
|
|
//
|
|
|
|
|
// switch (viewModel?.positionInCluster, direction) {
|
|
|
|
|
// case (.top, .outgoing): return [ .bottomLeft, .topLeft, .topRight ]
|
|
|
|
|
// case (.middle, .outgoing): return [ .bottomLeft, .topLeft ]
|
|
|
|
|
// case (.bottom, .outgoing): return [ .bottomRight, .bottomLeft, .topLeft ]
|
|
|
|
|
// case (.top, .incoming): return [ .topLeft, .topRight, .bottomRight ]
|
|
|
|
|
// case (.middle, .incoming): return [ .topRight, .bottomRight ]
|
|
|
|
|
// case (.bottom, .incoming): return [ .topRight, .bottomRight, .bottomLeft ]
|
|
|
|
|
// case (.none, _): return .allCorners
|
|
|
|
|
// }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private func getCornerMask(from rectCorner: UIRectCorner) -> CACornerMask {
|
|
|
|
|
guard !rectCorner.contains(.allCorners) else {
|
|
|
|
|
return [ .layerMaxXMinYCorner, .layerMinXMinYCorner, .layerMaxXMaxYCorner, .layerMinXMaxYCorner]
|
|
|
|
|