forked from shadowfacts/Tusker
Fix links not getting cleared on cell reuse
This commit is contained in:
parent
ef6047fcb1
commit
71bfd1513a
|
@ -31,10 +31,10 @@ class ContentLabel: LinkLabel {
|
||||||
|
|
||||||
mutAttrString.addAttribute(.font, value: font, range: NSRange(location: 0, length: mutAttrString.length))
|
mutAttrString.addAttribute(.font, value: font, range: NSRange(location: 0, length: mutAttrString.length))
|
||||||
|
|
||||||
|
self.links = []
|
||||||
let linkAttributes: [NSAttributedString.Key: Any] = [
|
let linkAttributes: [NSAttributedString.Key: Any] = [
|
||||||
.foregroundColor: UIColor.blue,
|
.foregroundColor: UIColor.blue,
|
||||||
]
|
]
|
||||||
|
|
||||||
for (range, url) in links {
|
for (range, url) in links {
|
||||||
mutAttrString.addAttributes(linkAttributes, range: range)
|
mutAttrString.addAttributes(linkAttributes, range: range)
|
||||||
self.links.append(Link(range: range, url: url))
|
self.links.append(Link(range: range, url: url))
|
||||||
|
|
Loading…
Reference in New Issue