Only apply textColor for .text case of MessageData

This commit is contained in:
Corey Walo
2018-04-05 13:00:25 -05:00
parent 3dc6979a78
commit f48cd56851
2 changed files with 2 additions and 3 deletions
@@ -89,7 +89,7 @@ public protocol MessagesDisplayDelegate: AnyObject {
/// Specifies the color of the text for a `TextMessageCell`.
///
/// - Parameters:
/// - message: A `MessageType` with a `MessageData` case of `.text` or `.attributedText` to which the color will apply.
/// - message: A `MessageType` with a `MessageData` case of `.text` to which the color will apply.
/// - indexPath: The `IndexPath` of the cell.
/// - messagesCollectionView: The `MessagesCollectionView` in which this cell will be displayed.
///
+1 -2
View File
@@ -80,13 +80,12 @@ open class TextMessageCell: MessageContentCell {
switch message.data {
case .text(let text), .emoji(let text):
messageLabel.text = text
messageLabel.textColor = textColor
case .attributedText(let text):
messageLabel.attributedText = text
default:
break
}
// Needs to be set after the attributedText because it takes precedence
messageLabel.textColor = textColor
}
}