From 71c5d02479ee8fe4d20e5fa74e4f1c29e044f69f Mon Sep 17 00:00:00 2001 From: Isaac <> Date: Tue, 5 Nov 2024 17:52:21 +0100 Subject: [PATCH] Fix pip close animation --- .../GalleryUI/Sources/Items/UniversalVideoGalleryItem.swift | 2 ++ 1 file changed, 2 insertions(+) diff --git a/submodules/GalleryUI/Sources/Items/UniversalVideoGalleryItem.swift b/submodules/GalleryUI/Sources/Items/UniversalVideoGalleryItem.swift index 2fdb9d1f9c..bde79dbcd1 100644 --- a/submodules/GalleryUI/Sources/Items/UniversalVideoGalleryItem.swift +++ b/submodules/GalleryUI/Sources/Items/UniversalVideoGalleryItem.swift @@ -2993,9 +2993,11 @@ final class UniversalVideoGalleryItemNode: ZoomableContentGalleryItemNode { self.activePictureInPictureController = nil self.activePictureInPictureNavigationController = nil + let previousPresentationArguments = activePictureInPictureController.presentationArguments activePictureInPictureController.presentationArguments = nil activePictureInPictureNavigationController.currentWindow?.present(activePictureInPictureController, on: .root, blockInteraction: false, completion: { }) + activePictureInPictureController.presentationArguments = previousPresentationArguments activePictureInPictureController.view.alpha = 1.0 activePictureInPictureController.view.layer.animateAlpha(from: 0.0, to: 1.0, duration: 0.35, completion: { _ in