diff --git a/submodules/TelegramUI/Components/Gifts/GiftOptionsScreen/Sources/GiftOptionsScreen.swift b/submodules/TelegramUI/Components/Gifts/GiftOptionsScreen/Sources/GiftOptionsScreen.swift index 08eac311a9..643d1f7131 100644 --- a/submodules/TelegramUI/Components/Gifts/GiftOptionsScreen/Sources/GiftOptionsScreen.swift +++ b/submodules/TelegramUI/Components/Gifts/GiftOptionsScreen/Sources/GiftOptionsScreen.swift @@ -1567,6 +1567,9 @@ final class GiftOptionsScreenComponent: Component { } } } + if disallowedGifts.contains(.unique) && gift.availability?.remains == 0 { + return false + } } return true } diff --git a/submodules/TelegramUI/Components/PeerInfo/PeerInfoCoverComponent/Sources/PeerInfoGiftsCoverComponent.swift b/submodules/TelegramUI/Components/PeerInfo/PeerInfoCoverComponent/Sources/PeerInfoGiftsCoverComponent.swift index 81ba25209d..4f32eca5a3 100644 --- a/submodules/TelegramUI/Components/PeerInfo/PeerInfoCoverComponent/Sources/PeerInfoGiftsCoverComponent.swift +++ b/submodules/TelegramUI/Components/PeerInfo/PeerInfoCoverComponent/Sources/PeerInfoGiftsCoverComponent.swift @@ -184,7 +184,9 @@ public final class PeerInfoGiftsCoverComponent: Component { } } + private var scheduledAnimateIn = false public func willAnimateIn() { + self.scheduledAnimateIn = true for (_, layer) in self.iconLayers { layer.opacity = 0.0 } @@ -194,6 +196,7 @@ public final class PeerInfoGiftsCoverComponent: Component { guard let _ = self.currentSize, let component = self.component else { return } + self.scheduledAnimateIn = false for (_, layer) in self.iconLayers { layer.opacity = 1.0 @@ -319,8 +322,12 @@ public final class PeerInfoGiftsCoverComponent: Component { self.iconLayers[id] = iconLayer self.layer.addSublayer(iconLayer) - iconLayer.animateAlpha(from: 0.0, to: 1.0, duration: 0.2) - iconLayer.animateScale(from: 0.01, to: 1.0, duration: 0.2) + if self.scheduledAnimateIn { + 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) } @@ -349,7 +356,10 @@ public final class PeerInfoGiftsCoverComponent: Component { iconTransition.setPosition(layer: iconLayer, position: absolutePosition) iconLayer.updateRotation(effectiveAngle, transition: iconTransition) 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 } diff --git a/submodules/TelegramUI/Images.xcassets/Wallet/QrIcon.imageset/Contents.json b/submodules/TelegramUI/Images.xcassets/Wallet/QrIcon.imageset/Contents.json deleted file mode 100644 index f8015db3bc..0000000000 --- a/submodules/TelegramUI/Images.xcassets/Wallet/QrIcon.imageset/Contents.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "images" : [ - { - "filename" : "ic_qrcode.pdf", - "idiom" : "universal" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/submodules/TelegramUI/Images.xcassets/Wallet/QrIcon.imageset/ic_qrcode.pdf b/submodules/TelegramUI/Images.xcassets/Wallet/QrIcon.imageset/ic_qrcode.pdf deleted file mode 100644 index cf234b8223..0000000000 Binary files a/submodules/TelegramUI/Images.xcassets/Wallet/QrIcon.imageset/ic_qrcode.pdf and /dev/null differ