mirror of
https://github.com/MessageKit/MessageKit.git
synced 2026-02-06 19:03:19 +00:00
[Fixed] Emoji 2x sizing bug
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -68,13 +68,10 @@ open class TextMessageCell: MessageCollectionViewCell<MessageLabel> {
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user