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: case .iPhone14Pro, .iPhone14ProMax:
return 55.0 return 55.0
case .iPhone16Pro, .iPhone16ProMax: case .iPhone16Pro, .iPhone16ProMax:
return 55.0 return 62.0
case .iPhoneAir: case .iPhoneAir:
return 55.0 return 62.0
case let .unknown(_, _, _, screenCornerRadius): case let .unknown(_, _, _, screenCornerRadius):
return screenCornerRadius return screenCornerRadius
default: default:

View File

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