Fix gallery push animation

This commit is contained in:
Ilya Laktyushin
2023-02-02 07:09:47 +04:00
parent 3242bfc507
commit 6a5bead5bc
2 changed files with 7 additions and 0 deletions

View File

@@ -1112,6 +1112,10 @@ public class GalleryController: ViewController, StandalonePresentableController,
let animatedOutNode = !simpleAnimation
if let chatController = strongSelf.baseNavigationController?.topViewController as? ChatController {
chatController.updatePushedTransition(0.0, transition: .animated(duration: 0.45, curve: .customSpring(damping: 180.0, initialVelocity: 0.0)))
}
strongSelf.galleryNode.animateOut(animateContent: animatedOutNode, completion: {
})
}

View File

@@ -18216,6 +18216,9 @@ public final class ChatControllerImpl: TelegramBaseController, ChatController, G
}
public func updatePushedTransition(_ fraction: CGFloat, transition: ContainedViewLayoutTransition) {
if !transition.isAnimated {
self.chatDisplayNode.historyNodeContainer.layer.removeAllAnimations()
}
let scale: CGFloat = 1.0 - 0.06 * fraction
transition.updateTransformScale(node: self.chatDisplayNode.historyNodeContainer, scale: scale)
}