corrected logic error.
This commit is contained in:
parent
8e6087f86e
commit
7a86febc7c
@ -358,7 +358,7 @@ public typealias ActionBlock = () -> Void
|
||||
Appends an external link image to the end of the attributed string.
|
||||
Will provide one whitespace to the left of the icon
|
||||
*/
|
||||
public func appendExternalLinkIcon() {
|
||||
@objc public func appendExternalLinkIcon() {
|
||||
|
||||
guard let attributedText = attributedText else { return }
|
||||
|
||||
@ -386,9 +386,9 @@ public typealias ActionBlock = () -> Void
|
||||
let mutableString = NSMutableAttributedString(attributedString: attributedText)
|
||||
|
||||
if index != 0 {
|
||||
mutableString.insert(NSAttributedString(string: " "), at: index - 1)
|
||||
mutableString.insert(NSAttributedString(string: " "), at: index)
|
||||
}
|
||||
mutableString.insert(NSAttributedString(attachment: Label.getTextAttachmentImage(dimension: font.pointSize)), at: index)
|
||||
mutableString.insert(NSAttributedString(attachment: Label.getTextAttachmentImage(dimension: font.pointSize)), at: index + 1)
|
||||
self.attributedText = mutableString
|
||||
|
||||
hasAttachmentImage = true
|
||||
|
||||
Loading…
Reference in New Issue
Block a user