Various fixes

This commit is contained in:
Ilya Laktyushin
2024-03-04 17:52:17 +04:00
parent 79ac0a6c5f
commit be9463e80b
7 changed files with 47 additions and 13 deletions

View File

@@ -1329,10 +1329,16 @@ public final class ChatMessageInteractiveFileNode: ASDisplayNode {
strongSelf.view.addSubview(audioTranscriptionButton)
added = true
}
let buttonTheme: AudioTranscriptionButtonComponent.Theme
if let customTintColor = arguments.customTintColor {
buttonTheme = .custom(customTintColor.withMultipliedAlpha(0.1), customTintColor)
} else {
buttonTheme = .bubble(arguments.incoming ? arguments.presentationData.theme.theme.chat.message.incoming : arguments.presentationData.theme.theme.chat.message.outgoing)
}
let audioTranscriptionButtonSize = audioTranscriptionButton.update(
transition: animation.isAnimated ? .easeInOut(duration: 0.3) : .immediate,
component: AnyComponent(AudioTranscriptionButtonComponent(
theme: .bubble(arguments.incoming ? arguments.presentationData.theme.theme.chat.message.incoming : arguments.presentationData.theme.theme.chat.message.outgoing),
theme: buttonTheme,
transcriptionState: effectiveAudioTranscriptionState,
pressed: {
guard let strongSelf = self else {