mirror of
https://github.com/oxen-io/session-ios.git
synced 2023-12-13 21:30:14 +01:00
tweak: fully rounded corners for all message bubbles
This commit is contained in:
parent
e9d598e62a
commit
c4aeecdf4b
|
@ -900,19 +900,7 @@ final class VisibleMessageCell: MessageCell, TappableLabelDelegate {
|
|||
// MARK: - Convenience
|
||||
|
||||
private func getCornersToRound() -> UIRectCorner {
|
||||
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
|
||||
}
|
||||
return .allCorners
|
||||
}
|
||||
|
||||
private func getCornerMask(from rectCorner: UIRectCorner) -> CACornerMask {
|
||||
|
|
Loading…
Reference in a new issue