mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-11-07 17:30:12 +00:00
Fix gallery transition
This commit is contained in:
parent
c04705502f
commit
7a930fd68a
@ -80,7 +80,7 @@ final class GlobalOverlayPresentationContext {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if updateTrackingNode {
|
if updateTrackingNode {
|
||||||
self.currentTrackingNode?.removeFromSupernode()
|
/*self.currentTrackingNode?.removeFromSupernode()
|
||||||
let trackingNode = HierarchyTrackingNode({ [weak self] value in
|
let trackingNode = HierarchyTrackingNode({ [weak self] value in
|
||||||
guard let strongSelf = self else {
|
guard let strongSelf = self else {
|
||||||
return
|
return
|
||||||
@ -91,7 +91,7 @@ final class GlobalOverlayPresentationContext {
|
|||||||
})
|
})
|
||||||
|
|
||||||
self.currentTrackingNode = trackingNode
|
self.currentTrackingNode = trackingNode
|
||||||
keyboardView.layer.addSublayer(trackingNode.layer)
|
keyboardView.layer.addSublayer(trackingNode.layer)*/
|
||||||
}
|
}
|
||||||
return keyboardWindow
|
return keyboardWindow
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -3,5 +3,6 @@ import AccountContext
|
|||||||
|
|
||||||
public protocol GalleryItemTransitionNode: class {
|
public protocol GalleryItemTransitionNode: class {
|
||||||
func isAvailableForGalleryTransition() -> Bool
|
func isAvailableForGalleryTransition() -> Bool
|
||||||
|
func isAvailableForInstantPageTransition() -> Bool
|
||||||
var decoration: UniversalVideoDecoration? { get }
|
var decoration: UniversalVideoDecoration? { get }
|
||||||
}
|
}
|
||||||
|
|||||||
@ -922,7 +922,7 @@ final class UniversalVideoGalleryItemNode: ZoomableContentGalleryItemNode {
|
|||||||
videoNode.continuePlayingWithoutSound()
|
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()
|
copyView.removeFromSuperview()
|
||||||
|
|
||||||
let previousFrame = videoNode.frame
|
let previousFrame = videoNode.frame
|
||||||
|
|||||||
@ -86,6 +86,10 @@ final class InstantPagePlayableVideoNode: ASDisplayNode, InstantPageNode, Galler
|
|||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func isAvailableForInstantPageTransition() -> Bool {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
override func didLoad() {
|
override func didLoad() {
|
||||||
super.didLoad()
|
super.didLoad()
|
||||||
|
|
||||||
|
|||||||
@ -153,6 +153,10 @@ final class ChatMessageInteractiveMediaNode: ASDisplayNode, GalleryItemTransitio
|
|||||||
return self.automaticPlayback ?? false
|
return self.automaticPlayback ?? false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func isAvailableForInstantPageTransition() -> Bool {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
override func didLoad() {
|
override func didLoad() {
|
||||||
super.didLoad()
|
super.didLoad()
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user