diff --git a/Packages/ComposeUI/Sources/ComposeUI/Views/NewMainTextView.swift b/Packages/ComposeUI/Sources/ComposeUI/Views/NewMainTextView.swift index 4f545e54..8505d096 100644 --- a/Packages/ComposeUI/Sources/ComposeUI/Views/NewMainTextView.swift +++ b/Packages/ComposeUI/Sources/ComposeUI/Views/NewMainTextView.swift @@ -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) } }