mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 22:55:00 +00:00
Various fixes
This commit is contained in:
@@ -1161,7 +1161,6 @@ private final class PremiumIntroScreenContentComponent: CombinedComponent {
|
||||
})
|
||||
|
||||
let termsString: MultilineTextComponent.TextContent
|
||||
// if context.component.isPremium == true {
|
||||
if let promoConfiguration = context.state.promoConfiguration {
|
||||
let attributedString = stringWithAppliedEntities(promoConfiguration.status, entities: promoConfiguration.statusEntities, baseColor: termsTextColor, linkColor: environment.theme.list.itemAccentColor, baseFont: termsFont, linkFont: termsFont, boldFont: boldTermsFont, italicFont: italicTermsFont, boldItalicFont: boldItalicTermsFont, fixedFont: monospaceTermsFont, blockQuoteFont: termsFont)
|
||||
termsString = .plain(attributedString)
|
||||
@@ -1390,6 +1389,13 @@ private final class PremiumIntroScreenComponent: CombinedComponent {
|
||||
return
|
||||
}
|
||||
|
||||
guard !self.context.account.testingEnvironment else {
|
||||
let presentationData = self.context.sharedContext.currentPresentationData.with { $0 }
|
||||
let alertController = textAlertController(context: self.context, title: nil, text: "Telegram Premium purchase is not available in the test environment.", actions: [TextAlertAction(type: .defaultAction, title: presentationData.strings.Common_OK, action: {})])
|
||||
self.present(alertController)
|
||||
return
|
||||
}
|
||||
|
||||
addAppLogEvent(postbox: self.context.account.postbox, type: "premium.promo_screen_accept")
|
||||
|
||||
self.inProgress = true
|
||||
|
||||
Reference in New Issue
Block a user