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

@@ -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