mirror of
https://github.com/TelegramMessenger/Telegram-iOS.git
synced 2026-07-05 19:28:46 +02:00
Merge 1e3eb721aa into 6e370e06d1
This commit is contained in:
commit
57b539f427
1 changed files with 16 additions and 6 deletions
|
|
@ -683,12 +683,22 @@ extension ChatControllerImpl {
|
|||
}
|
||||
}
|
||||
|
||||
if #available(iOS 18.0, *) {
|
||||
if engineExperimentalInternalTranslationService == nil, let hostView = self.context.sharedContext.mainWindow?.hostView {
|
||||
let translationService = ExperimentalInternalTranslationServiceImpl(view: hostView.containerView)
|
||||
engineExperimentalInternalTranslationService = translationService
|
||||
}
|
||||
}
|
||||
// Disabled: ExperimentalInternalTranslationServiceImpl.init constructs a
|
||||
// UIHostingController(rootView: TranslationViewImpl(...)) that fatal-traps
|
||||
// inside SwiftUI/Translation-framework internals on device (SIGABRT, no
|
||||
// application-code frames at the trap site — confirmed on iOS 26.5,
|
||||
// reproducible on the first chat opened per app session). A trap inside
|
||||
// Apple's own framework code cannot be guarded or caught from Swift, so
|
||||
// the only available mitigation is not calling into it. Re-enable once
|
||||
// the underlying SwiftUI + .translationTask interop bug is understood
|
||||
// or fixed by an OS update.
|
||||
//
|
||||
// if #available(iOS 18.0, *) {
|
||||
// if engineExperimentalInternalTranslationService == nil, let hostView = self.context.sharedContext.mainWindow?.hostView {
|
||||
// let translationService = ExperimentalInternalTranslationServiceImpl(view: hostView.containerView)
|
||||
// engineExperimentalInternalTranslationService = translationService
|
||||
// }
|
||||
// }
|
||||
|
||||
self.displayNode = ChatControllerNode(context: self.context, chatLocation: self.chatLocation, chatLocationContextHolder: self.chatLocationContextHolder, subject: self.subject, controllerInteraction: self.controllerInteraction!, chatPresentationInterfaceState: self.presentationInterfaceState, automaticMediaDownloadSettings: self.automaticMediaDownloadSettings, navigationBar: self.navigationBar, statusBar: self.statusBar, backgroundNode: self.chatBackgroundNode, controller: self)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue