File tree Expand file tree Collapse file tree 1 file changed +11
-9
lines changed
submodules/TelegramUI/Components/Stories/StoryContainerScreen/Sources Expand file tree Collapse file tree 1 file changed +11
-9
lines changed Original file line number Diff line number Diff line change @@ -1882,16 +1882,18 @@ private final class StoryContainerScreenComponent: Component {
18821882 if let previousRotationFraction = itemSetView. rotationFraction, !itemSetTransition. animation. isImmediate {
18831883 let fromT = previousRotationFraction
18841884 let toT = panFraction + cubeAdditionalRotationFraction
1885- itemSetTransition. setTransformAsKeyframes ( view: itemSetView, transform: { sourceT, isFinal in
1886- let t = fromT * ( 1.0 - sourceT) + toT * sourceT
1887- if isFinal {
1888- if abs ( t - 0.0 ) <= 0.0001 {
1889- return CATransform3DIdentity
1885+ if abs ( fromT - toT) > CGFloat . leastNonzeroMagnitude {
1886+ itemSetTransition. setTransformAsKeyframes ( view: itemSetView, transform: { sourceT, isFinal in
1887+ let t = fromT * ( 1.0 - sourceT) + toT * sourceT
1888+ if isFinal {
1889+ if abs ( t - 0.0 ) <= 0.0001 {
1890+ return CATransform3DIdentity
1891+ }
18901892 }
1891- }
1892-
1893- return calculateCubeTransform ( rotationFraction : t , sideAngle : sideAngle , cubeSize : itemFrame . size )
1894- } )
1893+
1894+ return calculateCubeTransform ( rotationFraction : t , sideAngle : sideAngle , cubeSize : itemFrame . size )
1895+ } )
1896+ }
18951897 } else {
18961898 let updatedTransform : CATransform3D
18971899 if abs ( panFraction + cubeAdditionalRotationFraction) <= 0.0001 {
You can’t perform that action at this time.
0 commit comments