mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:55:59 +00:00
Rename detectPermalinks to addMatrixEntityPermalinkAttributesTo and move code around
This commit is contained in:
@@ -493,7 +493,7 @@ final class ComposerToolbarViewModel: ComposerToolbarViewModelType, ComposerTool
|
||||
attributedString = NSMutableAttributedString(string: string, attributes: [.link: URL(string: urlString) as Any])
|
||||
}
|
||||
|
||||
attributedStringBuilder.detectPermalinks(attributedString)
|
||||
attributedStringBuilder.addMatrixEntityPermalinkAttributesTo(attributedString)
|
||||
|
||||
// In RTE mentions don't need to be handled as links
|
||||
attributedString.removeAttribute(.link, range: NSRange(location: 0, length: attributedString.length))
|
||||
@@ -606,7 +606,7 @@ final class ComposerToolbarViewModel: ComposerToolbarViewModelType, ComposerTool
|
||||
attributedString.addAttribute(.MatrixAllUsersMention, value: true, range: match.range)
|
||||
}
|
||||
|
||||
attributedStringBuilder.detectPermalinks(attributedString)
|
||||
attributedStringBuilder.addMatrixEntityPermalinkAttributesTo(attributedString)
|
||||
|
||||
state.bindings.plainComposerText = attributedString
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user