mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-13 09:50:17 +00:00
Merge branch 'master' of gitlab.com:peter-iakovlev/telegram-ios
This commit is contained in:
commit
008a1a09a7
@ -1882,16 +1882,18 @@ private final class StoryContainerScreenComponent: Component {
|
|||||||
if let previousRotationFraction = itemSetView.rotationFraction, !itemSetTransition.animation.isImmediate {
|
if let previousRotationFraction = itemSetView.rotationFraction, !itemSetTransition.animation.isImmediate {
|
||||||
let fromT = previousRotationFraction
|
let fromT = previousRotationFraction
|
||||||
let toT = panFraction + cubeAdditionalRotationFraction
|
let toT = panFraction + cubeAdditionalRotationFraction
|
||||||
itemSetTransition.setTransformAsKeyframes(view: itemSetView, transform: { sourceT, isFinal in
|
if abs(fromT - toT) > CGFloat.leastNonzeroMagnitude {
|
||||||
let t = fromT * (1.0 - sourceT) + toT * sourceT
|
itemSetTransition.setTransformAsKeyframes(view: itemSetView, transform: { sourceT, isFinal in
|
||||||
if isFinal {
|
let t = fromT * (1.0 - sourceT) + toT * sourceT
|
||||||
if abs(t - 0.0) <= 0.0001 {
|
if isFinal {
|
||||||
return CATransform3DIdentity
|
if abs(t - 0.0) <= 0.0001 {
|
||||||
|
return CATransform3DIdentity
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
return calculateCubeTransform(rotationFraction: t, sideAngle: sideAngle, cubeSize: itemFrame.size)
|
||||||
return calculateCubeTransform(rotationFraction: t, sideAngle: sideAngle, cubeSize: itemFrame.size)
|
})
|
||||||
})
|
}
|
||||||
} else {
|
} else {
|
||||||
let updatedTransform: CATransform3D
|
let updatedTransform: CATransform3D
|
||||||
if abs(panFraction + cubeAdditionalRotationFraction) <= 0.0001 {
|
if abs(panFraction + cubeAdditionalRotationFraction) <= 0.0001 {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user