mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Fix unnecessary bounce
This commit is contained in:
parent
6e17762083
commit
9dd2e07b95
@ -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(
|
self.animationState = AnimationState(
|
||||||
duration: duration * UIView.animationDurationFactor(),
|
duration: duration * UIView.animationDurationFactor(),
|
||||||
fromIsUnlocked: previousComponent.unlocked,
|
fromIsUnlocked: previousComponent.unlocked,
|
||||||
@ -1491,7 +1496,7 @@ public final class StoryPeerListComponent: Component {
|
|||||||
fromTitleWidth: self.currentTitleWidth,
|
fromTitleWidth: self.currentTitleWidth,
|
||||||
fromActivityFraction: self.currentActivityFraction,
|
fromActivityFraction: self.currentActivityFraction,
|
||||||
startTime: timestamp,
|
startTime: timestamp,
|
||||||
bounce: animationHint?.bounce ?? true
|
bounce: allowBounce
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user