mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 14:20:20 +00:00
If they set attributedString to nil twice, ignore the second one.
This commit is contained in:
@@ -336,14 +336,14 @@ static NSArray *DefaultLinkAttributeNames = @[ NSLinkAttributeName ];
|
||||
|
||||
- (void)setAttributedString:(NSAttributedString *)attributedString
|
||||
{
|
||||
if (ASObjectIsEqual(attributedString, _attributedString)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (attributedString == nil) {
|
||||
attributedString = [[NSAttributedString alloc] initWithString:@"" attributes:nil];
|
||||
}
|
||||
|
||||
if (ASObjectIsEqual(attributedString, _attributedString)) {
|
||||
return;
|
||||
}
|
||||
|
||||
_attributedString = ASCleanseAttributedStringOfCoreTextAttributes(attributedString);
|
||||
|
||||
// Sync the truncation string with attributes from the updated _attributedString
|
||||
|
||||
Reference in New Issue
Block a user