Skip to content

Commit b7f84a9

Browse files
committed
Various fixes
1 parent 7afa30f commit b7f84a9

File tree

4 files changed

+16
-15
lines changed

4 files changed

+16
-15
lines changed

submodules/TelegramUI/Components/Gifts/GiftOptionsScreen/Sources/GiftOptionsScreen.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1567,6 +1567,9 @@ final class GiftOptionsScreenComponent: Component {
15671567
}
15681568
}
15691569
}
1570+
if disallowedGifts.contains(.unique) && gift.availability?.remains == 0 {
1571+
return false
1572+
}
15701573
}
15711574
return true
15721575
}

submodules/TelegramUI/Components/PeerInfo/PeerInfoCoverComponent/Sources/PeerInfoGiftsCoverComponent.swift

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,9 @@ public final class PeerInfoGiftsCoverComponent: Component {
184184
}
185185
}
186186

187+
private var scheduledAnimateIn = false
187188
public func willAnimateIn() {
189+
self.scheduledAnimateIn = true
188190
for (_, layer) in self.iconLayers {
189191
layer.opacity = 0.0
190192
}
@@ -194,6 +196,7 @@ public final class PeerInfoGiftsCoverComponent: Component {
194196
guard let _ = self.currentSize, let component = self.component else {
195197
return
196198
}
199+
self.scheduledAnimateIn = false
197200

198201
for (_, layer) in self.iconLayers {
199202
layer.opacity = 1.0
@@ -319,8 +322,12 @@ public final class PeerInfoGiftsCoverComponent: Component {
319322
self.iconLayers[id] = iconLayer
320323
self.layer.addSublayer(iconLayer)
321324

322-
iconLayer.animateAlpha(from: 0.0, to: 1.0, duration: 0.2)
323-
iconLayer.animateScale(from: 0.01, to: 1.0, duration: 0.2)
325+
if self.scheduledAnimateIn {
326+
iconLayer.opacity = 0.0
327+
} else {
328+
iconLayer.animateAlpha(from: 0.0, to: 1.0, duration: 0.2)
329+
iconLayer.animateScale(from: 0.01, to: 1.0, duration: 0.2)
330+
}
324331

325332
iconLayer.startAnimations(index: index)
326333
}
@@ -349,7 +356,10 @@ public final class PeerInfoGiftsCoverComponent: Component {
349356
iconTransition.setPosition(layer: iconLayer, position: absolutePosition)
350357
iconLayer.updateRotation(effectiveAngle, transition: iconTransition)
351358
iconTransition.setScale(layer: iconLayer, scale: iconPosition.scale * (1.0 - itemScaleFraction))
352-
iconTransition.setAlpha(layer: iconLayer, alpha: 1.0 - itemScaleFraction)
359+
360+
if !self.scheduledAnimateIn {
361+
iconTransition.setAlpha(layer: iconLayer, alpha: 1.0 - itemScaleFraction)
362+
}
353363

354364
index += 1
355365
}

submodules/TelegramUI/Images.xcassets/Wallet/QrIcon.imageset/Contents.json

Lines changed: 0 additions & 12 deletions
This file was deleted.
Binary file not shown.

0 commit comments

Comments
 (0)