Re-add formatting context menu actions on Compose
This commit is contained in:
parent
9de5ef69cf
commit
dcd9c0b424
@ -281,8 +281,8 @@ extension WrappedTextViewCoordinator: UITextViewDelegate {
|
|||||||
if range.length > 0 {
|
if range.length > 0 {
|
||||||
let formatMenu = suggestedActions[index] as! UIMenu
|
let formatMenu = suggestedActions[index] as! UIMenu
|
||||||
let newFormatMenu = formatMenu.replacingChildren(StatusFormat.allCases.map { fmt in
|
let newFormatMenu = formatMenu.replacingChildren(StatusFormat.allCases.map { fmt in
|
||||||
return UIAction(title: fmt.accessibilityLabel, image: UIImage(systemName: fmt.imageName)) { _ in
|
return UIAction(title: fmt.accessibilityLabel, image: UIImage(systemName: fmt.imageName)) { [weak self] _ in
|
||||||
// TODO
|
self?.applyFormat(fmt)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
actions[index] = newFormatMenu
|
actions[index] = newFormatMenu
|
||||||
@ -290,13 +290,11 @@ extension WrappedTextViewCoordinator: UITextViewDelegate {
|
|||||||
actions.remove(at: index)
|
actions.remove(at: index)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// TODO
|
if range.length == 0 {
|
||||||
// if range.length == 0 {
|
actions.append(UIAction(title: "Insert Emoji", image: UIImage(systemName: "face.smiling"), handler: { [weak self] _ in
|
||||||
// actions.append(UIAction(title: "Insert Emoji", image: UIImage(systemName: "face.smiling"), handler: { [weak self] _ in
|
self?.beginAutocompletingEmoji()
|
||||||
// self?.controller.shouldEmojiAutocompletionBeginExpanded = true
|
}))
|
||||||
// self?.beginAutocompletingEmoji()
|
}
|
||||||
// }))
|
|
||||||
// }
|
|
||||||
return UIMenu(children: actions)
|
return UIMenu(children: actions)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user