From ffd82647ee97c68e4da4802fe9717ccccd8105c9 Mon Sep 17 00:00:00 2001 From: Ilya Laktyushin Date: Fri, 1 May 2026 15:29:18 +0200 Subject: [PATCH] Various fixes --- .../AuthorizationSequencePaymentScreen.swift | 35 ++++++++++--------- .../Sources/InAppPurchaseManager.swift | 1 + .../CountriesMultiselectionScreen.swift | 3 +- 3 files changed, 21 insertions(+), 18 deletions(-) diff --git a/submodules/AuthorizationUI/Sources/AuthorizationSequencePaymentScreen.swift b/submodules/AuthorizationUI/Sources/AuthorizationSequencePaymentScreen.swift index 8658893b75..ddb76da69a 100644 --- a/submodules/AuthorizationUI/Sources/AuthorizationSequencePaymentScreen.swift +++ b/submodules/AuthorizationUI/Sources/AuthorizationSequencePaymentScreen.swift @@ -28,6 +28,7 @@ import PhoneNumberFormat import PlainButtonComponent import StoreKit import DeviceModel +import GlassBarButtonComponent final class AuthorizationSequencePaymentScreenComponent: Component { typealias EnvironmentType = ViewControllerComponentContainer.Environment @@ -254,25 +255,27 @@ final class AuthorizationSequencePaymentScreenComponent: Component { let helpButtonSize = self.helpButton.update( transition: transition, - component: AnyComponent(PlainButtonComponent( - content: AnyComponent(MultilineTextComponent( - text: .plain(NSAttributedString(string: environment.strings.Login_PhoneNumberHelp, font: Font.regular(17.0), textColor: environment.theme.list.itemAccentColor)) - )), - minSize: CGSize(width: 0.0, height: 44.0), - contentInsets: UIEdgeInsets(top: 0.0, left: 8.0, bottom: 0.0, right: 8.0), - action: { [weak self] in - guard let self else { - return + component: AnyComponent( + GlassBarButtonComponent( + size: nil, + backgroundColor: nil, + isDark: environment.theme.overallDarkAppearance, + state: .glass, + component: AnyComponentWithIdentity(id: "label", component: AnyComponent(MultilineTextComponent( + text: .plain(NSAttributedString(string: environment.strings.Login_PhoneNumberHelp, font: Font.regular(17.0), textColor: environment.theme.chat.inputPanel.panelControlColor)) + ))), + action: { [weak self] _ in + guard let self else { + return + } + self.displaySendEmail(error: nil, errorCode: nil) } - self.displaySendEmail(error: nil, errorCode: nil) - }, - animateScale: false, - animateContents: false - )), + ) + ), environment: {}, - containerSize: CGSize(width: 200.0, height: 100.0) + containerSize: CGSize(width: 200.0, height: 44.0) ) - let helpButtonFrame = CGRect(origin: CGPoint(x: availableSize.width - 8.0 - helpButtonSize.width, y: environment.statusBarHeight), size: helpButtonSize) + let helpButtonFrame = CGRect(origin: CGPoint(x: availableSize.width - 16.0 - helpButtonSize.width, y: environment.navigationHeight - helpButtonSize.height - 6.0), size: helpButtonSize) if let helpButtonView = self.helpButton.view { if helpButtonView.superview == nil { self.addSubview(helpButtonView) diff --git a/submodules/InAppPurchaseManager/Sources/InAppPurchaseManager.swift b/submodules/InAppPurchaseManager/Sources/InAppPurchaseManager.swift index 74f3824243..23ea3eb290 100644 --- a/submodules/InAppPurchaseManager/Sources/InAppPurchaseManager.swift +++ b/submodules/InAppPurchaseManager/Sources/InAppPurchaseManager.swift @@ -28,6 +28,7 @@ private let productIdentifiers = [ "org.telegram.telegramPremium.twelveMonths.code_x10", "org.telegram.telegramPremium.oneWeek.auth", + "org.telegram.telegramPremium.threeDays.auth", "org.telegram.telegramStars.topup.x15", "org.telegram.telegramStars.topup.x25", diff --git a/submodules/TelegramUI/Components/ShareWithPeersScreen/Sources/CountriesMultiselectionScreen.swift b/submodules/TelegramUI/Components/ShareWithPeersScreen/Sources/CountriesMultiselectionScreen.swift index 3c3ad2573a..20f40edbe2 100644 --- a/submodules/TelegramUI/Components/ShareWithPeersScreen/Sources/CountriesMultiselectionScreen.swift +++ b/submodules/TelegramUI/Components/ShareWithPeersScreen/Sources/CountriesMultiselectionScreen.swift @@ -464,8 +464,7 @@ final class CountriesMultiselectionScreenComponent: Component { update() } - let limit = component.context.userLimits.maxGiveawayCountriesCount - if self.selectedCountries.count >= limit, index == nil { + if let limit = component.stateContext.maxCount, self.selectedCountries.count >= limit, index == nil { self.hapticFeedback.error() let presentationData = component.context.sharedContext.currentPresentationData.with { $0 }