diff --git a/submodules/AttachmentUI/Sources/AttachmentController.swift b/submodules/AttachmentUI/Sources/AttachmentController.swift index 1b6acb457d..724d5b529c 100644 --- a/submodules/AttachmentUI/Sources/AttachmentController.swift +++ b/submodules/AttachmentUI/Sources/AttachmentController.swift @@ -768,6 +768,10 @@ public class AttachmentController: ViewController { } } + deinit { + print() + } + public required init(coder aDecoder: NSCoder) { fatalError("init(coder:) has not been implemented") } diff --git a/submodules/TranslateUI/Sources/Translate.swift b/submodules/TranslateUI/Sources/Translate.swift index 4555491a82..7d385dbb01 100644 --- a/submodules/TranslateUI/Sources/Translate.swift +++ b/submodules/TranslateUI/Sources/Translate.swift @@ -175,30 +175,6 @@ public func canTranslateText(context: AccountContext, text: String, showTranslat } } -public func translateText(context: AccountContext, text: String, fromLang: String? = nil) { - guard !text.isEmpty else { - return - } - if #available(iOS 15.0, *) { - let text = text.unicodeScalars.filter { !$0.properties.isEmojiPresentation }.reduce("") { $0 + String($1) } - - let textView = UITextView() - textView.text = text - textView.isEditable = false - if let navigationController = context.sharedContext.mainWindow?.viewController as? NavigationController, let topController = navigationController.topViewController as? ViewController { - topController.view.addSubview(textView) - textView.selectAll(nil) - - DispatchQueue.main.async { - textView.removeFromSuperview() - } - } - - let toLang = context.sharedContext.currentPresentationData.with { $0 }.strings.baseLanguageCode - let _ = context.engine.messages.translate(text: text, fromLang: fromLang, toLang: toLang).start() - } -} - public struct TextTranslationResult: Equatable { let text: String let detectedLanguage: String?