mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 14:20:20 +00:00
Various Improvements
This commit is contained in:
@@ -203,6 +203,7 @@ public enum RecognizedTextSelectionAction {
|
||||
case share
|
||||
case lookup
|
||||
case speak
|
||||
case translate
|
||||
}
|
||||
|
||||
public final class RecognizedTextSelectionNode: ASDisplayNode {
|
||||
@@ -509,6 +510,12 @@ public final class RecognizedTextSelectionNode: ASDisplayNode {
|
||||
self?.performAction(selectedText, .lookup)
|
||||
let _ = self?.dismissSelection()
|
||||
}))
|
||||
// if #available(iOS 15.0, *) {
|
||||
// actions.append(ContextMenuAction(content: .text(title: self.strings.Conversation_ContextMenuTranslate, accessibilityLabel: self.strings.Conversation_ContextMenuTranslate), action: { [weak self] in
|
||||
// self?.performAction(selectedText, .translate)
|
||||
// let _ = self?.dismissSelection()
|
||||
// }))
|
||||
// }
|
||||
if isSpeakSelectionEnabled() {
|
||||
actions.append(ContextMenuAction(content: .text(title: self.strings.Conversation_ContextMenuSpeak, accessibilityLabel: self.strings.Conversation_ContextMenuSpeak), action: { [weak self] in
|
||||
self?.performAction(selectedText, .speak)
|
||||
|
||||
Reference in New Issue
Block a user