mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Various fixes
This commit is contained in:
parent
7afa30f3d8
commit
b7f84a97b5
@ -1567,6 +1567,9 @@ final class GiftOptionsScreenComponent: Component {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if disallowedGifts.contains(.unique) && gift.availability?.remains == 0 {
|
||||||
|
return false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
@ -184,7 +184,9 @@ public final class PeerInfoGiftsCoverComponent: Component {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private var scheduledAnimateIn = false
|
||||||
public func willAnimateIn() {
|
public func willAnimateIn() {
|
||||||
|
self.scheduledAnimateIn = true
|
||||||
for (_, layer) in self.iconLayers {
|
for (_, layer) in self.iconLayers {
|
||||||
layer.opacity = 0.0
|
layer.opacity = 0.0
|
||||||
}
|
}
|
||||||
@ -194,6 +196,7 @@ public final class PeerInfoGiftsCoverComponent: Component {
|
|||||||
guard let _ = self.currentSize, let component = self.component else {
|
guard let _ = self.currentSize, let component = self.component else {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
self.scheduledAnimateIn = false
|
||||||
|
|
||||||
for (_, layer) in self.iconLayers {
|
for (_, layer) in self.iconLayers {
|
||||||
layer.opacity = 1.0
|
layer.opacity = 1.0
|
||||||
@ -319,8 +322,12 @@ public final class PeerInfoGiftsCoverComponent: Component {
|
|||||||
self.iconLayers[id] = iconLayer
|
self.iconLayers[id] = iconLayer
|
||||||
self.layer.addSublayer(iconLayer)
|
self.layer.addSublayer(iconLayer)
|
||||||
|
|
||||||
iconLayer.animateAlpha(from: 0.0, to: 1.0, duration: 0.2)
|
if self.scheduledAnimateIn {
|
||||||
iconLayer.animateScale(from: 0.01, to: 1.0, duration: 0.2)
|
iconLayer.opacity = 0.0
|
||||||
|
} else {
|
||||||
|
iconLayer.animateAlpha(from: 0.0, to: 1.0, duration: 0.2)
|
||||||
|
iconLayer.animateScale(from: 0.01, to: 1.0, duration: 0.2)
|
||||||
|
}
|
||||||
|
|
||||||
iconLayer.startAnimations(index: index)
|
iconLayer.startAnimations(index: index)
|
||||||
}
|
}
|
||||||
@ -349,7 +356,10 @@ public final class PeerInfoGiftsCoverComponent: Component {
|
|||||||
iconTransition.setPosition(layer: iconLayer, position: absolutePosition)
|
iconTransition.setPosition(layer: iconLayer, position: absolutePosition)
|
||||||
iconLayer.updateRotation(effectiveAngle, transition: iconTransition)
|
iconLayer.updateRotation(effectiveAngle, transition: iconTransition)
|
||||||
iconTransition.setScale(layer: iconLayer, scale: iconPosition.scale * (1.0 - itemScaleFraction))
|
iconTransition.setScale(layer: iconLayer, scale: iconPosition.scale * (1.0 - itemScaleFraction))
|
||||||
iconTransition.setAlpha(layer: iconLayer, alpha: 1.0 - itemScaleFraction)
|
|
||||||
|
if !self.scheduledAnimateIn {
|
||||||
|
iconTransition.setAlpha(layer: iconLayer, alpha: 1.0 - itemScaleFraction)
|
||||||
|
}
|
||||||
|
|
||||||
index += 1
|
index += 1
|
||||||
}
|
}
|
||||||
|
@ -1,12 +0,0 @@
|
|||||||
{
|
|
||||||
"images" : [
|
|
||||||
{
|
|
||||||
"filename" : "ic_qrcode.pdf",
|
|
||||||
"idiom" : "universal"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"info" : {
|
|
||||||
"author" : "xcode",
|
|
||||||
"version" : 1
|
|
||||||
}
|
|
||||||
}
|
|
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user