Render links and mentions as regular text in thread list

This commit is contained in:
ismailgulek
2022-04-05 02:35:32 +03:00
parent 018485bd3c
commit e058adaee4
2 changed files with 8 additions and 1 deletions
@@ -29,4 +29,11 @@ public extension NSAttributedString {
return unquotedSubstrings.joined(separator: " ") as NSString
}
/// Returns a new attributed string by removing all links from the receiver.
@objc var byRemovingLinks: NSAttributedString {
let result = NSMutableAttributedString(attributedString: self)
result.removeAttribute(.link, range: NSRange(location: 0, length: length))
return result
}
}