Fix links not getting cleared on cell reuse

This commit is contained in:
Shadowfacts 2019-02-07 21:26:16 -05:00
parent ef6047fcb1
commit 71bfd1513a
Signed by: shadowfacts
GPG Key ID: 94A5AB95422746E5
1 changed files with 1 additions and 1 deletions

View File

@ -31,10 +31,10 @@ class ContentLabel: LinkLabel {
mutAttrString.addAttribute(.font, value: font, range: NSRange(location: 0, length: mutAttrString.length))
self.links = []
let linkAttributes: [NSAttributedString.Key: Any] = [
.foregroundColor: UIColor.blue,
]
for (range, url) in links {
mutAttrString.addAttributes(linkAttributes, range: range)
self.links.append(Link(range: range, url: url))