mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 12:07:55 +00:00
use all the default action info just change its handler
This commit is contained in:
@@ -146,7 +146,12 @@ struct MessageText: UIViewRepresentable {
|
||||
|
||||
func textView(_ textView: UITextView, primaryActionFor textItem: UITextItem, defaultAction: UIAction) -> UIAction? {
|
||||
if case .link(let url) = textItem.content {
|
||||
return .init(title: defaultAction.title) { [weak self] _ in
|
||||
return .init(title: defaultAction.title,
|
||||
image: defaultAction.image,
|
||||
identifier: defaultAction.identifier,
|
||||
discoverabilityTitle: defaultAction.discoverabilityTitle,
|
||||
attributes: defaultAction.attributes,
|
||||
state: defaultAction.state) { [weak self] _ in
|
||||
self?.openURLAction.callAsFunction(url)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user