mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2026-01-05 20:52:48 +00:00
[ASTextNode] Reset _composedTruncationText when attributedText is updated (#3210)
* [ASTextNode] Reset _composedTruncationText when attributedText is updated Current issue: 1) Set `attributedText` in `ASTextNode` with whiteColor 2) `_composedTruncationText` gets updated to take on this new color attribute 3) Set the `attributedText` with greenColor 4) The `_composedTruncationText` gets updated with the new attributes, but does NOT overwrite any existing attributes — i.e., does not overwrite the white color with green. Comment from `_locked_prepareTruncationStringForDrawing:`: ` // Add any of the original string's attributes to the truncation string, // but don't overwrite any of the truncation string's attributes ` * michael’s suggestion
This commit is contained in:
@@ -1292,7 +1292,7 @@ static NSAttributedString *DefaultTruncationAttributedString()
|
||||
{
|
||||
//If we have neither return the default
|
||||
if (!_additionalTruncationMessage && !_truncationAttributedText) {
|
||||
return _composedTruncationText;
|
||||
return DefaultTruncationAttributedString();
|
||||
}
|
||||
// Short circuit if we only have one or the other.
|
||||
if (!_additionalTruncationMessage) {
|
||||
|
||||
Reference in New Issue
Block a user