diff --git a/Sources/Layout/MessagesCollectionViewFlowLayout.swift b/Sources/Layout/MessagesCollectionViewFlowLayout.swift index 51fd9c39..83e9ea8b 100644 --- a/Sources/Layout/MessagesCollectionViewFlowLayout.swift +++ b/Sources/Layout/MessagesCollectionViewFlowLayout.swift @@ -131,7 +131,13 @@ open class MessagesCollectionViewFlowLayout: UICollectionViewFlowLayout { attributes.cellBottomLabelFrame = CGRect(origin: .zero, size: cellBottomLabelSize(for: message, at: indexPath)) attributes.avatarFrame = CGRect(origin: .zero, size: avatarSize(for: message, at: indexPath)) - attributes.messageLabelFont = messageLabelFont + switch message.data { + case .emoji: + attributes.messageLabelFont = emojiLabelFont + default: + attributes.messageLabelFont = messageLabelFont + } + attributes.messagePadding = messagePadding attributes.messageLabelInsets = messageInsets attributes.cellTopLabelInsets = topLabelInsets diff --git a/Sources/Views/Cells/TextMessageCell.swift b/Sources/Views/Cells/TextMessageCell.swift index b6dc6d6a..278ba26d 100644 --- a/Sources/Views/Cells/TextMessageCell.swift +++ b/Sources/Views/Cells/TextMessageCell.swift @@ -68,13 +68,10 @@ open class TextMessageCell: MessageCollectionViewCell { } switch message.data { - case .text(let text): + case .text(let text), .emoji(let text): messageContentView.text = text case .attributedText(let text): messageContentView.attributedText = text - case .emoji(let text): - messageContentView.text = text - messageContentView.font = messageContentView.font.withSize(2 * messageContentView.font.pointSize) default: break }