Skip to content

Commit b646060

Browse files
committed
Updated access control from review
1 parent 1e20621 commit b646060

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

Sources/Layout/MessageSizeCalculator.swift

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ open class MessageSizeCalculator: CellSizeCalculator {
107107

108108
// MARK: - Avatar
109109

110-
open func avatarPosition(for message: MessageType) -> AvatarPosition {
110+
public func avatarPosition(for message: MessageType) -> AvatarPosition {
111111
let dataSource = messagesLayout.messagesDataSource
112112
let isFromCurrentSender = dataSource.isFromCurrentSender(message: message)
113113
var position = isFromCurrentSender ? outgoingAvatarPosition : incomingAvatarPosition
@@ -121,45 +121,45 @@ open class MessageSizeCalculator: CellSizeCalculator {
121121
return position
122122
}
123123

124-
open func avatarSize(for message: MessageType) -> CGSize {
124+
public func avatarSize(for message: MessageType) -> CGSize {
125125
let dataSource = messagesLayout.messagesDataSource
126126
let isFromCurrentSender = dataSource.isFromCurrentSender(message: message)
127127
return isFromCurrentSender ? outgoingAvatarSize : incomingAvatarSize
128128
}
129129

130130
// MARK: - Top Label
131131

132-
open func cellTopLabelSize(for message: MessageType, at indexPath: IndexPath) -> CGSize {
132+
public func cellTopLabelSize(for message: MessageType, at indexPath: IndexPath) -> CGSize {
133133
let layoutDelegate = messagesLayout.messagesLayoutDelegate
134134
let collectionView = messagesLayout.messagesCollectionView
135135
let height = layoutDelegate.cellTopLabelHeight(for: message, at: indexPath, in: collectionView)
136136
return CGSize(width: messagesLayout.itemWidth, height: height)
137137
}
138138

139-
open func cellTopLabelAlignment(for message: MessageType) -> LabelAlignment {
139+
public func cellTopLabelAlignment(for message: MessageType) -> LabelAlignment {
140140
let dataSource = messagesLayout.messagesDataSource
141141
let isFromCurrentSender = dataSource.isFromCurrentSender(message: message)
142142
return isFromCurrentSender ? outgoingCellTopLabelAlignment : incomingCellTopLabelAlignment
143143
}
144144

145145
// MARK: - Bottom Label
146146

147-
open func cellBottomLabelSize(for message: MessageType, at indexPath: IndexPath) -> CGSize {
147+
public func cellBottomLabelSize(for message: MessageType, at indexPath: IndexPath) -> CGSize {
148148
let layoutDelegate = messagesLayout.messagesLayoutDelegate
149149
let collectionView = messagesLayout.messagesCollectionView
150150
let height = layoutDelegate.cellBottomLabelHeight(for: message, at: indexPath, in: collectionView)
151151
return CGSize(width: messagesLayout.itemWidth, height: height)
152152
}
153153

154-
open func cellBottomLabelAlignment(for message: MessageType) -> LabelAlignment {
154+
public func cellBottomLabelAlignment(for message: MessageType) -> LabelAlignment {
155155
let dataSource = messagesLayout.messagesDataSource
156156
let isFromCurrentSender = dataSource.isFromCurrentSender(message: message)
157157
return isFromCurrentSender ? outgoingCellBottomLabelAlignment : incomingCellBottomLabelAlignment
158158
}
159159

160160
// MARK: - MessageContainer
161161

162-
open func messageContainerPadding(for message: MessageType) -> UIEdgeInsets {
162+
public func messageContainerPadding(for message: MessageType) -> UIEdgeInsets {
163163
let dataSource = messagesLayout.messagesDataSource
164164
let isFromCurrentSender = dataSource.isFromCurrentSender(message: message)
165165
return isFromCurrentSender ? outgoingMessagePadding : incomingMessagePadding
@@ -185,7 +185,7 @@ open class MessageSizeCalculator: CellSizeCalculator {
185185
return layout
186186
}
187187

188-
public func labelSize(for attributedText: NSAttributedString, considering maxWidth: CGFloat) -> CGSize {
188+
internal func labelSize(for attributedText: NSAttributedString, considering maxWidth: CGFloat) -> CGSize {
189189
let estimatedHeight = attributedText.height(considering: maxWidth)
190190
let estimatedWidth = attributedText.width(considering: estimatedHeight)
191191

0 commit comments

Comments
 (0)