Fix unnecessary bounce

This commit is contained in:
Ali 2023-07-21 02:27:44 +04:00
parent 6e17762083
commit 9dd2e07b95

View File

@ -1484,6 +1484,11 @@ public final class StoryPeerListComponent: Component {
)
}
var allowBounce = !previousComponent.unlocked && component.unlocked
if let animationHint, !animationHint.bounce {
allowBounce = false
}
self.animationState = AnimationState(
duration: duration * UIView.animationDurationFactor(),
fromIsUnlocked: previousComponent.unlocked,
@ -1491,7 +1496,7 @@ public final class StoryPeerListComponent: Component {
fromTitleWidth: self.currentTitleWidth,
fromActivityFraction: self.currentActivityFraction,
startTime: timestamp,
bounce: animationHint?.bounce ?? true
bounce: allowBounce
)
}