Fix build

This commit is contained in:
Ilya Laktyushin 2025-09-25 15:37:49 +04:00
parent 700c915495
commit 934ed73331
3 changed files with 17 additions and 5 deletions

View File

@ -217,9 +217,9 @@ public enum DeviceMetrics: CaseIterable, Equatable {
case .iPhone14Pro, .iPhone14ProMax:
return 55.0
case .iPhone16Pro, .iPhone16ProMax:
return 55.0
return 62.0
case .iPhoneAir:
return 55.0
return 62.0
case let .unknown(_, _, _, screenCornerRadius):
return screenCornerRadius
default:

View File

@ -394,7 +394,7 @@ public extension Peer {
public extension TelegramPeerUsername {
var isActive: Bool {
return self.flags.contains(.isActive) || self.flags.contains(.isEditable)
return self.flags.contains(.isActive)
}
}

View File

@ -768,7 +768,8 @@ final class UserAppearanceScreenComponent: Component {
valueCurrency: nil,
flags: [],
themePeerId: nil,
peerColor: nil
peerColor: nil,
hostPeerId: nil
)
signal = component.context.engine.accountData.setStarGiftStatus(starGift: gift, expirationDate: emojiStatus.expirationDate)
} else {
@ -1110,7 +1111,16 @@ final class UserAppearanceScreenComponent: Component {
let updatedSection = Section(rawValue: intValue) ?? .profile
if self.currentSection != updatedSection {
if (updatedSection == .name && self.selectedProfileGift != nil) || (updatedSection == .profile && self.selectedNameGift != nil) {
switch updatedSection {
case .profile:
self.selectedNameGift = nil
self.updatedPeerNameColor = nil
self.updatedPeerNameEmoji = nil
case .name:
self.selectedProfileGift = nil
self.updatedPeerProfileColor = nil
self.updatedPeerProfileEmoji = nil
}
} else {
self.currentSection = updatedSection
self.state?.updated(transition: .easeInOut(duration: 0.3).withUserData(TransitionHint(animateTabChange: true)))
@ -1871,6 +1881,8 @@ public class UserAppearanceScreen: ViewControllerComponentContainer {
self.automaticallyControlPresentationContextLayout = false
self.supportedOrientations = ViewControllerSupportedOrientations(regularSize: .all, compactSize: .portrait)
let presentationData = context.sharedContext.currentPresentationData.with { $0 }
self.title = ""
self.navigationItem.backBarButtonItem = UIBarButtonItem(title: presentationData.strings.Common_Back, style: .plain, target: nil, action: nil)