Fix video transcription text update

This commit is contained in:
Ilya Laktyushin
2022-10-22 16:11:32 +03:00
parent fc2a32678b
commit d9fb54b67f
3 changed files with 26 additions and 10 deletions

View File

@@ -60,15 +60,20 @@ class ChatMessageInstantVideoBubbleContentNode: ChatMessageBubbleContentNode {
let _ = item.controllerInteraction.requestMessageUpdate(item.message.id)
}
}
self.interactiveVideoNode.updateTranscribeExpanded = { [weak self] state, text in
self.interactiveVideoNode.updateTranscriptionExpanded = { [weak self] state in
if let strongSelf = self, let item = strongSelf.item {
strongSelf.audioTranscriptionState = state
strongSelf.interactiveFileNode.audioTranscriptionState = state
let _ = item.controllerInteraction.requestMessageUpdate(item.message.id)
}
}
self.interactiveVideoNode.updateTranscriptionText = { [weak self] text in
if let strongSelf = self, let item = strongSelf.item {
strongSelf.interactiveFileNode.forcedAudioTranscriptionText = text
let _ = item.controllerInteraction.requestMessageUpdate(item.message.id)
}
}
self.interactiveFileNode.updateTranscribeExpanded = { [weak self] state in
self.interactiveFileNode.updateTranscriptionExpanded = { [weak self] state in
if let strongSelf = self, let item = strongSelf.item {
strongSelf.audioTranscriptionState = state
strongSelf.interactiveVideoNode.audioTranscriptionState = state