diff --git a/submodules/GalleryUI/Sources/GalleryController.swift b/submodules/GalleryUI/Sources/GalleryController.swift index c48b278773..2d18e46444 100644 --- a/submodules/GalleryUI/Sources/GalleryController.swift +++ b/submodules/GalleryUI/Sources/GalleryController.swift @@ -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: { }) } diff --git a/submodules/TelegramUI/Sources/ChatController.swift b/submodules/TelegramUI/Sources/ChatController.swift index 4e74668a01..1fccb8b2b0 100644 --- a/submodules/TelegramUI/Sources/ChatController.swift +++ b/submodules/TelegramUI/Sources/ChatController.swift @@ -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) }