Video improvements

This commit is contained in:
Isaac
2024-11-08 16:26:01 +01:00
parent bae29f301e
commit 3797f3af4f
31 changed files with 773 additions and 314 deletions

View File

@@ -126,6 +126,19 @@ import AdsInfoScreen
extension ChatControllerImpl {
func loadDisplayNodeImpl() {
if #available(iOS 18.0, *) {
if self.context.sharedContext.immediateExperimentalUISettings.enableLocalTranslation {
if engineExperimentalInternalTranslationService == nil, let hostView = self.context.sharedContext.mainWindow?.hostView {
let translationService = ExperimentalInternalTranslationServiceImpl(view: hostView.containerView)
engineExperimentalInternalTranslationService = translationService
}
} else {
if engineExperimentalInternalTranslationService != nil {
engineExperimentalInternalTranslationService = nil
}
}
}
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)
if let currentItem = self.tempVoicePlaylistCurrentItem {