diff --git a/MVMCoreUI/Atoms/Views/Label.swift b/MVMCoreUI/Atoms/Views/Label.swift index 186c24c8..c1ba5ef5 100644 --- a/MVMCoreUI/Atoms/Views/Label.swift +++ b/MVMCoreUI/Atoms/Views/Label.swift @@ -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