mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2026-01-06 21:22:44 +00:00
Fix gallery push animation
This commit is contained in:
@@ -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: {
|
||||
})
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user