Fix build

This commit is contained in:
Ilya Laktyushin 2025-06-24 01:46:25 +02:00
parent 0da5f08f22
commit 212164b072
3 changed files with 15 additions and 28 deletions

View File

@ -381,7 +381,6 @@ final class PeerInfoScreenData {
let hasBotPreviewItems: Bool
let isPremiumRequiredForStoryPosting: Bool
let personalChannel: PeerInfoPersonalChannelData?
let tonState: StarsContext.State?
let starsState: StarsContext.State?
let tonState: StarsContext.State?
let starsRevenueStatsState: StarsRevenueStats?
@ -434,7 +433,6 @@ final class PeerInfoScreenData {
hasBotPreviewItems: Bool,
isPremiumRequiredForStoryPosting: Bool,
personalChannel: PeerInfoPersonalChannelData?,
tonState: StarsContext.State?,
starsState: StarsContext.State?,
tonState: StarsContext.State?,
starsRevenueStatsState: StarsRevenueStats?,
@ -475,7 +473,6 @@ final class PeerInfoScreenData {
self.hasBotPreviewItems = hasBotPreviewItems
self.isPremiumRequiredForStoryPosting = isPremiumRequiredForStoryPosting
self.personalChannel = personalChannel
self.tonState = tonState
self.starsState = starsState
self.tonState = tonState
self.starsRevenueStatsState = starsRevenueStatsState
@ -852,13 +849,6 @@ func peerInfoScreenSettingsData(context: AccountContext, peerId: EnginePeer.Id,
}
}
let tonState: Signal<StarsContext.State?, NoError>
if let tonContext {
tonState = tonContext.state
} else {
tonState = .single(nil)
}
let starsState: Signal<StarsContext.State?, NoError>
if let starsContext {
starsState = starsContext.state
@ -979,7 +969,6 @@ func peerInfoScreenSettingsData(context: AccountContext, peerId: EnginePeer.Id,
hasBotPreviewItems: false,
isPremiumRequiredForStoryPosting: true,
personalChannel: personalChannel,
tonState: tonState,
starsState: starsState,
tonState: tonState,
starsRevenueStatsState: nil,
@ -1031,7 +1020,6 @@ func peerInfoScreenData(context: AccountContext, peerId: PeerId, strings: Presen
hasBotPreviewItems: false,
isPremiumRequiredForStoryPosting: true,
personalChannel: nil,
tonState: nil,
starsState: nil,
tonState: nil,
starsRevenueStatsState: nil,
@ -1492,7 +1480,6 @@ func peerInfoScreenData(context: AccountContext, peerId: PeerId, strings: Presen
hasBotPreviewItems: hasBotPreviewItems,
isPremiumRequiredForStoryPosting: false,
personalChannel: personalChannel,
tonState: nil,
starsState: nil,
tonState: nil,
starsRevenueStatsState: starsRevenueContextAndState.1,
@ -1725,7 +1712,6 @@ func peerInfoScreenData(context: AccountContext, peerId: PeerId, strings: Presen
hasBotPreviewItems: false,
isPremiumRequiredForStoryPosting: isPremiumRequiredForStoryPosting,
personalChannel: personalChannel,
tonState: nil,
starsState: nil,
tonState: nil,
starsRevenueStatsState: starsRevenueContextAndState.1,
@ -2059,7 +2045,6 @@ func peerInfoScreenData(context: AccountContext, peerId: PeerId, strings: Presen
hasBotPreviewItems: false,
isPremiumRequiredForStoryPosting: isPremiumRequiredForStoryPosting,
personalChannel: nil,
tonState: nil,
starsState: nil,
tonState: nil,
starsRevenueStatsState: starsRevenueContextAndState.1,

View File

@ -10670,11 +10670,7 @@ final class PeerInfoScreenNode: ViewControllerTracingNode, PeerInfoScreenNodePro
}
case .ton:
if let tonContext = self.controller?.tonContext {
<<<<<<< HEAD
push(self.context.sharedContext.makeTonTransactionsScreen(context: self.context, tonContext: tonContext))
=======
push(self.context.sharedContext.makeStarsTransactionsScreen(context: self.context, starsContext: tonContext))
>>>>>>> 51a16c711078fab6940623bf1de0ec85516ba699
}
}
}
@ -12992,12 +12988,6 @@ public final class PeerInfoScreenImpl: ViewController, PeerInfoScreen, KeyShortc
self.starsContext = nil
self.tonContext = nil
}
if isSettings, let tonContext = context.tonContext {
self.tonContext = tonContext
tonContext.load(force: true)
} else {
self.tonContext = nil
}
if isMyProfile, let profileGiftsContext {
profileGiftsContext.updateFilter(.All)

View File

@ -374,13 +374,19 @@ public final class StarsAvatarComponent: Component {
public final class StarsLabelComponent: CombinedComponent {
let text: NSAttributedString
let subtext: NSAttributedString?
let iconName: String
let iconColor: UIColor?
public init(
text: NSAttributedString,
subtext: NSAttributedString? = nil
subtext: NSAttributedString? = nil,
iconName: String = "Premium/Stars/StarMedium",
iconColor: UIColor? = nil
) {
self.text = text
self.subtext = subtext
self.iconName = iconName
self.iconColor = iconColor
}
public static func ==(lhs: StarsLabelComponent, rhs: StarsLabelComponent) -> Bool {
@ -390,6 +396,12 @@ public final class StarsLabelComponent: CombinedComponent {
if lhs.subtext != rhs.subtext {
return false
}
if lhs.iconName != rhs.iconName {
return false
}
if lhs.iconColor != rhs.iconColor {
return false
}
return true
}
@ -420,8 +432,8 @@ public final class StarsLabelComponent: CombinedComponent {
let iconSize = CGSize(width: 20.0, height: 20.0)
let icon = icon.update(
component: BundleIconComponent(
name: "Premium/Stars/StarMedium",
tintColor: nil
name: component.iconName,
tintColor: component.iconColor
),
availableSize: iconSize,
transition: context.transition