mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-26 19:34:25 +02:00
Rename RoomBubbleCellLayout to PlainRoomCellLayoutConstants.
This commit is contained in:
+2
-2
@@ -16,9 +16,9 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
/// MXKRoomBubbleTableViewCell layout constants
|
||||
/// Plain room cells layout constants
|
||||
@objcMembers
|
||||
final class RoomBubbleCellLayout: NSObject {
|
||||
final class PlainRoomCellLayoutConstants: NSObject {
|
||||
|
||||
/// Inner content view margins
|
||||
static let innerContentViewMargins: UIEdgeInsets = UIEdgeInsets(top: 0, left: 57, bottom: 0.0, right: 0)
|
||||
@@ -54,12 +54,12 @@ class PlainRoomTimelineCellDecorator: RoomTimelineCellDecorator {
|
||||
urlPreviewView.availableWidth = cellData.maxTextViewWidth
|
||||
cellContentView.addSubview(urlPreviewView)
|
||||
|
||||
var leftMargin = RoomBubbleCellLayout.reactionsViewLeftMargin
|
||||
var leftMargin = PlainRoomCellLayoutConstants.reactionsViewLeftMargin
|
||||
if cellData.containsBubbleComponentWithEncryptionBadge {
|
||||
leftMargin += RoomBubbleCellLayout.encryptedContentLeftMargin
|
||||
leftMargin += PlainRoomCellLayoutConstants.encryptedContentLeftMargin
|
||||
}
|
||||
|
||||
let topMargin = contentViewPositionY + RoomBubbleCellLayout.urlPreviewViewTopMargin + RoomBubbleCellLayout.reactionsViewTopMargin
|
||||
let topMargin = contentViewPositionY + PlainRoomCellLayoutConstants.urlPreviewViewTopMargin + PlainRoomCellLayoutConstants.reactionsViewTopMargin
|
||||
|
||||
// Set the preview view's origin
|
||||
NSLayoutConstraint.activate([
|
||||
@@ -85,14 +85,14 @@ class PlainRoomTimelineCellDecorator: RoomTimelineCellDecorator {
|
||||
|
||||
cellContentView.addSubview(reactionsView)
|
||||
|
||||
var leftMargin = RoomBubbleCellLayout.reactionsViewLeftMargin
|
||||
var leftMargin = PlainRoomCellLayoutConstants.reactionsViewLeftMargin
|
||||
|
||||
if cellData.containsBubbleComponentWithEncryptionBadge {
|
||||
leftMargin += RoomBubbleCellLayout.encryptedContentLeftMargin
|
||||
leftMargin += PlainRoomCellLayoutConstants.encryptedContentLeftMargin
|
||||
}
|
||||
|
||||
let rightMargin = RoomBubbleCellLayout.reactionsViewRightMargin
|
||||
let topMargin = RoomBubbleCellLayout.reactionsViewTopMargin
|
||||
let rightMargin = PlainRoomCellLayoutConstants.reactionsViewRightMargin
|
||||
let topMargin = PlainRoomCellLayoutConstants.reactionsViewTopMargin
|
||||
|
||||
// The top constraint may need to include the URL preview view
|
||||
let topConstraint: NSLayoutConstraint
|
||||
@@ -127,13 +127,13 @@ class PlainRoomTimelineCellDecorator: RoomTimelineCellDecorator {
|
||||
cellContentView.addSubview(readReceiptsView)
|
||||
|
||||
// Force receipts container size
|
||||
let widthConstraint = readReceiptsView.widthAnchor.constraint(equalToConstant: RoomBubbleCellLayout.readReceiptsViewWidth)
|
||||
let heightConstraint = readReceiptsView.heightAnchor.constraint(equalToConstant: RoomBubbleCellLayout.readReceiptsViewHeight)
|
||||
let widthConstraint = readReceiptsView.widthAnchor.constraint(equalToConstant: PlainRoomCellLayoutConstants.readReceiptsViewWidth)
|
||||
let heightConstraint = readReceiptsView.heightAnchor.constraint(equalToConstant: PlainRoomCellLayoutConstants.readReceiptsViewHeight)
|
||||
|
||||
// Force receipts container position
|
||||
let trailingConstraint = readReceiptsView.trailingAnchor.constraint(equalTo: cellContentView.trailingAnchor, constant: -RoomBubbleCellLayout.readReceiptsViewRightMargin)
|
||||
let trailingConstraint = readReceiptsView.trailingAnchor.constraint(equalTo: cellContentView.trailingAnchor, constant: -PlainRoomCellLayoutConstants.readReceiptsViewRightMargin)
|
||||
|
||||
let topMargin = RoomBubbleCellLayout.readReceiptsViewTopMargin
|
||||
let topMargin = PlainRoomCellLayoutConstants.readReceiptsViewTopMargin
|
||||
|
||||
let topConstraint: NSLayoutConstraint
|
||||
if let upperDecorationView = upperDecorationView {
|
||||
@@ -168,14 +168,14 @@ class PlainRoomTimelineCellDecorator: RoomTimelineCellDecorator {
|
||||
|
||||
cellContentView.addSubview(threadSummaryView)
|
||||
|
||||
var leftMargin = RoomBubbleCellLayout.reactionsViewLeftMargin
|
||||
var leftMargin = PlainRoomCellLayoutConstants.reactionsViewLeftMargin
|
||||
|
||||
if cellData.containsBubbleComponentWithEncryptionBadge {
|
||||
leftMargin += RoomBubbleCellLayout.encryptedContentLeftMargin
|
||||
leftMargin += PlainRoomCellLayoutConstants.encryptedContentLeftMargin
|
||||
}
|
||||
|
||||
let rightMargin = RoomBubbleCellLayout.reactionsViewRightMargin
|
||||
let topMargin = RoomBubbleCellLayout.threadSummaryViewTopMargin
|
||||
let rightMargin = PlainRoomCellLayoutConstants.reactionsViewRightMargin
|
||||
let topMargin = PlainRoomCellLayoutConstants.threadSummaryViewTopMargin
|
||||
let height = ThreadSummaryView.contentViewHeight(forThread: threadSummaryView.thread,
|
||||
fitting: cellData.maxTextViewWidth)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user