diff --git a/submodules/Display/Display/GlobalOverlayPresentationContext.swift b/submodules/Display/Display/GlobalOverlayPresentationContext.swift index 4794e0b8a8..b9462e2fee 100644 --- a/submodules/Display/Display/GlobalOverlayPresentationContext.swift +++ b/submodules/Display/Display/GlobalOverlayPresentationContext.swift @@ -80,7 +80,7 @@ final class GlobalOverlayPresentationContext { } if updateTrackingNode { - self.currentTrackingNode?.removeFromSupernode() + /*self.currentTrackingNode?.removeFromSupernode() let trackingNode = HierarchyTrackingNode({ [weak self] value in guard let strongSelf = self else { return @@ -91,7 +91,7 @@ final class GlobalOverlayPresentationContext { }) self.currentTrackingNode = trackingNode - keyboardView.layer.addSublayer(trackingNode.layer) + keyboardView.layer.addSublayer(trackingNode.layer)*/ } return keyboardWindow } else { diff --git a/submodules/GalleryUI/Sources/GalleryItemTransitionNode.swift b/submodules/GalleryUI/Sources/GalleryItemTransitionNode.swift index 040a3e0ad4..f3ca3f979e 100644 --- a/submodules/GalleryUI/Sources/GalleryItemTransitionNode.swift +++ b/submodules/GalleryUI/Sources/GalleryItemTransitionNode.swift @@ -3,5 +3,6 @@ import AccountContext public protocol GalleryItemTransitionNode: class { func isAvailableForGalleryTransition() -> Bool + func isAvailableForInstantPageTransition() -> Bool var decoration: UniversalVideoDecoration? { get } } diff --git a/submodules/GalleryUI/Sources/Items/UniversalVideoGalleryItem.swift b/submodules/GalleryUI/Sources/Items/UniversalVideoGalleryItem.swift index f84bfaad60..08f500b27e 100644 --- a/submodules/GalleryUI/Sources/Items/UniversalVideoGalleryItem.swift +++ b/submodules/GalleryUI/Sources/Items/UniversalVideoGalleryItem.swift @@ -922,7 +922,7 @@ final class UniversalVideoGalleryItemNode: ZoomableContentGalleryItemNode { videoNode.continuePlayingWithoutSound() } } - } else if let _ = node.0 as? GalleryItemTransitionNode, videoNode.hasAttachedContext { + } else if let instantNode = node.0 as? GalleryItemTransitionNode, instantNode.isAvailableForInstantPageTransition(), videoNode.hasAttachedContext { copyView.removeFromSuperview() let previousFrame = videoNode.frame diff --git a/submodules/InstantPageUI/Sources/InstantPagePlayableVideoNode.swift b/submodules/InstantPageUI/Sources/InstantPagePlayableVideoNode.swift index a96cb1c688..998b3cdcdd 100644 --- a/submodules/InstantPageUI/Sources/InstantPagePlayableVideoNode.swift +++ b/submodules/InstantPageUI/Sources/InstantPagePlayableVideoNode.swift @@ -86,6 +86,10 @@ final class InstantPagePlayableVideoNode: ASDisplayNode, InstantPageNode, Galler return true } + func isAvailableForInstantPageTransition() -> Bool { + return true + } + override func didLoad() { super.didLoad() diff --git a/submodules/TelegramUI/TelegramUI/ChatMessageInteractiveMediaNode.swift b/submodules/TelegramUI/TelegramUI/ChatMessageInteractiveMediaNode.swift index bd592ac4ad..245fb998ed 100644 --- a/submodules/TelegramUI/TelegramUI/ChatMessageInteractiveMediaNode.swift +++ b/submodules/TelegramUI/TelegramUI/ChatMessageInteractiveMediaNode.swift @@ -153,6 +153,10 @@ final class ChatMessageInteractiveMediaNode: ASDisplayNode, GalleryItemTransitio return self.automaticPlayback ?? false } + func isAvailableForInstantPageTransition() -> Bool { + return false + } + override func didLoad() { super.didLoad()