diff --git a/submodules/ContextUI/Sources/ContextControllerExtractedPresentationNode.swift b/submodules/ContextUI/Sources/ContextControllerExtractedPresentationNode.swift index 644ed04281..8dab51ddf1 100644 --- a/submodules/ContextUI/Sources/ContextControllerExtractedPresentationNode.swift +++ b/submodules/ContextUI/Sources/ContextControllerExtractedPresentationNode.swift @@ -504,6 +504,17 @@ final class ContextControllerExtractedPresentationNode: ASDisplayNode, ContextCo ) if let reactionContextNode = self.reactionContextNode { + let reactionsPositionDeltaYDistance = -animationInContentDistance + reactionContextNode.layer.animateSpring( + from: NSValue(cgPoint: CGPoint(x: 0.0, y: reactionsPositionDeltaYDistance)), + to: NSValue(cgPoint: CGPoint()), + keyPath: "position", + duration: duration, + delay: 0.0, + initialVelocity: 0.0, + damping: springDamping, + additive: true + ) reactionContextNode.animateIn(from: currentContentScreenFrame) } diff --git a/submodules/ReactionSelectionNode/Sources/ReactionContextNode.swift b/submodules/ReactionSelectionNode/Sources/ReactionContextNode.swift index 62b4cc4252..1d0f40d5bf 100644 --- a/submodules/ReactionSelectionNode/Sources/ReactionContextNode.swift +++ b/submodules/ReactionSelectionNode/Sources/ReactionContextNode.swift @@ -606,7 +606,7 @@ public final class ReactionContextNode: ASDisplayNode, UIScrollViewDelegate { intermediateCompletion() } - transition.animatePositionWithKeyframes(node: itemNode, keyframes: generateParabollicMotionKeyframes(from: selfSourceRect.center, to: expandedFrame.center, elevation: 30.0), completion: { [weak self, weak itemNode, weak targetView] _ in + transition.animatePositionWithKeyframes(node: itemNode, keyframes: generateParabollicMotionKeyframes(from: selfSourceRect.center, to: expandedFrame.center, elevation: 30.0), completion: { [weak self, weak itemNode, weak targetView, weak animateTargetContainer] _ in DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + 0.1, execute: { guard let strongSelf = self else { return @@ -620,7 +620,11 @@ public final class ReactionContextNode: ASDisplayNode, UIScrollViewDelegate { guard let targetView = targetView as? ReactionIconView else { return } + if let animateTargetContainer = animateTargetContainer { + animateTargetContainer.isHidden = false + } targetView.isHidden = false + targetView.alpha = 1.0 targetView.imageView.alpha = 0.0 targetView.addSubnode(itemNode) itemNode.frame = targetView.bounds