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 {
|
||||
let formatMenu = suggestedActions[index] as! UIMenu
|
||||
let newFormatMenu = formatMenu.replacingChildren(StatusFormat.allCases.map { fmt in
|
||||
return UIAction(title: fmt.accessibilityLabel, image: UIImage(systemName: fmt.imageName)) { _ in
|
||||
// TODO
|
||||
return UIAction(title: fmt.accessibilityLabel, image: UIImage(systemName: fmt.imageName)) { [weak self] _ in
|
||||
self?.applyFormat(fmt)
|
||||
}
|
||||
})
|
||||
actions[index] = newFormatMenu
|
||||
@ -290,13 +290,11 @@ extension WrappedTextViewCoordinator: UITextViewDelegate {
|
||||
actions.remove(at: index)
|
||||
}
|
||||
}
|
||||
// TODO
|
||||
// if range.length == 0 {
|
||||
// actions.append(UIAction(title: "Insert Emoji", image: UIImage(systemName: "face.smiling"), handler: { [weak self] _ in
|
||||
// self?.controller.shouldEmojiAutocompletionBeginExpanded = true
|
||||
// self?.beginAutocompletingEmoji()
|
||||
// }))
|
||||
// }
|
||||
if range.length == 0 {
|
||||
actions.append(UIAction(title: "Insert Emoji", image: UIImage(systemName: "face.smiling"), handler: { [weak self] _ in
|
||||
self?.beginAutocompletingEmoji()
|
||||
}))
|
||||
}
|
||||
return UIMenu(children: actions)
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user