Group boosts

This commit is contained in:
Ilya Laktyushin
2024-02-07 20:56:13 +04:00
parent 714bcf7af3
commit 6af485cff1
7 changed files with 23 additions and 14 deletions

View File

@@ -841,6 +841,8 @@ public class ChatMessageInteractiveInstantVideoNode: ASDisplayNode {
} else {
displayTranscribe = false
}
} else if item.associatedData.alwaysDisplayTranscribeButton.providedByGroupBoost {
displayTranscribe = true
}
}
@@ -1813,13 +1815,12 @@ public class ChatMessageInteractiveInstantVideoNode: ASDisplayNode {
}
}
} else {
guard item.associatedData.isPremium else {
guard item.associatedData.isPremium || item.associatedData.alwaysDisplayTranscribeButton.providedByGroupBoost else {
if self.hapticFeedback == nil {
self.hapticFeedback = HapticFeedback()
}
self.hapticFeedback?.impact(.medium)
let tipController = UndoOverlayController(presentationData: presentationData, content: .universal(animation: "anim_voiceToText", scale: 0.065, colors: [:], title: nil, text: presentationData.strings.Message_AudioTranscription_SubscribeToPremium, customUndoText: presentationData.strings.Message_AudioTranscription_SubscribeToPremiumAction, timeout: nil), elevatedLayout: false, position: .top, animateInAsReplacement: false, action: { action in
if case .undo = action {
let context = item.context