Fix webpage transcription animation

This commit is contained in:
Ali
2022-05-31 16:30:49 +04:00
parent 7cb9f925bd
commit 3f3741ab89
3 changed files with 23 additions and 7 deletions

View File

@@ -349,16 +349,21 @@ final class ChatMessageInteractiveFileNode: ASDisplayNode {
var shouldBeginTranscription = false
var shouldExpandNow = false
if let result = transcribedText(message: message) {
if case .expanded = self.audioTranscriptionState {
shouldExpandNow = true
if case let .success(_, isPending) = result {
shouldBeginTranscription = isPending
} else {
if let result = transcribedText(message: message) {
shouldExpandNow = true
if case let .success(_, isPending) = result {
shouldBeginTranscription = isPending
} else {
shouldBeginTranscription = true
}
} else {
shouldBeginTranscription = true
}
} else {
shouldBeginTranscription = true
}
if shouldBeginTranscription {