Skip to content

Commit f48cd56

Browse files
committed
Only apply textColor for .text case of MessageData
1 parent 3dc6979 commit f48cd56

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

Sources/Protocols/MessagesDisplayDelegate.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ public protocol MessagesDisplayDelegate: AnyObject {
8989
/// Specifies the color of the text for a `TextMessageCell`.
9090
///
9191
/// - Parameters:
92-
/// - message: A `MessageType` with a `MessageData` case of `.text` or `.attributedText` to which the color will apply.
92+
/// - message: A `MessageType` with a `MessageData` case of `.text` to which the color will apply.
9393
/// - indexPath: The `IndexPath` of the cell.
9494
/// - messagesCollectionView: The `MessagesCollectionView` in which this cell will be displayed.
9595
///

Sources/Views/Cells/TextMessageCell.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,13 +80,12 @@ open class TextMessageCell: MessageContentCell {
8080
switch message.data {
8181
case .text(let text), .emoji(let text):
8282
messageLabel.text = text
83+
messageLabel.textColor = textColor
8384
case .attributedText(let text):
8485
messageLabel.attributedText = text
8586
default:
8687
break
8788
}
88-
// Needs to be set after the attributedText because it takes precedence
89-
messageLabel.textColor = textColor
9089
}
9190
}
9291

0 commit comments

Comments
 (0)