mirror of
https://github.com/TelegramMessenger/Telegram-iOS.git
synced 2026-07-06 03:33:41 +02:00
Fix build
This commit is contained in:
parent
010ccf5b1e
commit
38c8b7738f
2 changed files with 12 additions and 4 deletions
|
|
@ -1829,9 +1829,14 @@ private final class PremiumIntroScreenComponent: CombinedComponent {
|
|||
if let topContentOffset = state.topContentOffset, topContentOffset >= 123.0 {
|
||||
starIsVisible = false
|
||||
}
|
||||
|
||||
|
||||
var isIntro = true
|
||||
if case .profile = context.component.source {
|
||||
isIntro = false
|
||||
}
|
||||
|
||||
let star = star.update(
|
||||
component: PremiumStarComponent(isVisible: starIsVisible, hasIdleAnimations: state.hasIdleAnimations),
|
||||
component: PremiumStarComponent(isIntro: isIntro, isVisible: starIsVisible, hasIdleAnimations: state.hasIdleAnimations),
|
||||
availableSize: CGSize(width: min(390.0, context.availableSize.width), height: 220.0),
|
||||
transition: context.transition
|
||||
)
|
||||
|
|
|
|||
|
|
@ -375,10 +375,13 @@ class PremiumStarComponent: Component {
|
|||
return
|
||||
}
|
||||
|
||||
let fromScale: Float = self.isIntro ? 0.1 : 0.08
|
||||
let toScale: Float = self.isIntro ? 0.115 : 0.092
|
||||
|
||||
let animation = CABasicAnimation(keyPath: "scale")
|
||||
animation.duration = 2.0
|
||||
animation.fromValue = NSValue(scnVector3: SCNVector3(x: 0.1, y: 0.1, z: 0.1))
|
||||
animation.toValue = NSValue(scnVector3: SCNVector3(x: 0.115, y: 0.115, z: 0.115))
|
||||
animation.fromValue = NSValue(scnVector3: SCNVector3(x: fromScale, y: fromScale, z: fromScale))
|
||||
animation.toValue = NSValue(scnVector3: SCNVector3(x: toScale, y: toScale, z: toScale))
|
||||
animation.timingFunction = CAMediaTimingFunction(name: .easeInEaseOut)
|
||||
animation.autoreverses = true
|
||||
animation.repeatCount = .infinity
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue