Skip to content

Commit

Permalink
Update text color on being highlighted only if highlightedTextColor
Browse files Browse the repository at this point in the history
… is non-nil.

PiperOrigin-RevId: 448428292
  • Loading branch information
Nobody authored and material-automation committed May 13, 2022
1 parent 74ca146 commit b37353a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/attributedlabel/src/NIAttributedLabel.m
Original file line number Diff line number Diff line change
Expand Up @@ -1388,7 +1388,7 @@ - (NSMutableAttributedString *)mutableAttributedStringWithAdditions {
NSMutableAttributedString* attributedString = [self.mutableAttributedString mutableCopy];

// Set highlighted text color for the entire string first to avoid undesired style override e.g., link color.
if (self.isHighlighted) {
if (self.isHighlighted && self.highlightedTextColor) {
[attributedString setTextColor:self.highlightedTextColor];
}

Expand Down

0 comments on commit b37353a

Please sign in to comment.