Skip to content

Commit 86e7238

Browse files
committed
Various fixes
1 parent 3fb73a8 commit 86e7238

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

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

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -302,10 +302,10 @@ public final class PeerInfoGiftsCoverComponent: Component {
302302
}
303303

304304
let effectivePosition = interpolateRect(from: finalPosition, to: centerPosition, t: itemScaleFraction)
305-
305+
306306
transition.setBounds(layer: iconLayer, bounds: CGRect(origin: .zero, size: iconSize))
307307
transition.setPosition(layer: iconLayer, position: effectivePosition)
308-
transition.setScale(layer: iconLayer, scale: iconPosition.scale)
308+
transition.setScale(layer: iconLayer, scale: iconPosition.scale * (1.0 - itemScaleFraction))
309309
transition.setAlpha(layer: iconLayer, alpha: 1.0 - itemScaleFraction)
310310

311311
index += 1
@@ -437,8 +437,7 @@ private class PositionGenerator {
437437
let randomFactor = 0.05 + (1.0 - baseScale) * 0.1
438438
let randomValue = -randomFactor + CGFloat(self.rng.next()) * 2.0 * randomFactor
439439

440-
let finalScale = min(1.1, max(baseScale * 0.7, baseScale + randomValue))
441-
440+
let finalScale = min(1.2, max(baseScale * 0.65, baseScale + randomValue))
442441
positions.append(Position(center: result, scale: finalScale))
443442
}
444443
}
@@ -460,7 +459,13 @@ private class PositionGenerator {
460459

461460
for _ in 0..<4 {
462461
let min = self.minDistance + (totalRange * 0.19)
463-
let max = self.minDistance + (totalRange * 0.6)
462+
let max = self.minDistance + (totalRange * 0.55)
463+
ranges.append((min, max))
464+
}
465+
466+
for _ in 0..<4 {
467+
let min = self.minDistance + (totalRange * 0.6)
468+
let max = self.minDistance + (totalRange * 0.9)
464469
ranges.append((min, max))
465470
}
466471

0 commit comments

Comments
 (0)