mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-05 05:51:42 +00:00
Paid media improvements
This commit is contained in:
parent
e47b5a89ef
commit
6396a1ec80
@ -228,15 +228,19 @@ open class GalleryControllerNode: ASDisplayNode, ASScrollViewDelegate, ASGesture
|
|||||||
fromLeft = true
|
fromLeft = true
|
||||||
}
|
}
|
||||||
if let current = strongSelf.currentThumbnailContainerNode {
|
if let current = strongSelf.currentThumbnailContainerNode {
|
||||||
|
strongSelf.currentThumbnailContainerNode = nil
|
||||||
if thumbnailContainerVisible {
|
if thumbnailContainerVisible {
|
||||||
current.animateOut(toRight: fromLeft)
|
current.animateOut(toRight: fromLeft)
|
||||||
current.layer.animateAlpha(from: 1.0, to: 0.0, duration: 0.2, removeOnCompletion: false, completion: { [weak current] _ in
|
current.layer.animateAlpha(from: 1.0, to: 0.0, duration: 0.2, removeOnCompletion: false, completion: { [weak current] _ in
|
||||||
current?.removeFromSupernode()
|
current?.removeFromSupernode()
|
||||||
})
|
})
|
||||||
|
if let (navigationHeight, layout) = strongSelf.containerLayout, node == nil {
|
||||||
|
strongSelf.containerLayoutUpdated(layout, navigationBarHeight: navigationHeight, transition: .immediate)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
strongSelf.currentThumbnailContainerNode = node
|
|
||||||
if let node = node {
|
if let node = node {
|
||||||
|
strongSelf.currentThumbnailContainerNode = node
|
||||||
strongSelf.insertSubnode(node, aboveSubnode: strongSelf.footerNode)
|
strongSelf.insertSubnode(node, aboveSubnode: strongSelf.footerNode)
|
||||||
if let (navigationHeight, layout) = strongSelf.containerLayout, thumbnailContainerVisible {
|
if let (navigationHeight, layout) = strongSelf.containerLayout, thumbnailContainerVisible {
|
||||||
strongSelf.containerLayoutUpdated(layout, navigationBarHeight: navigationHeight, transition: .immediate)
|
strongSelf.containerLayoutUpdated(layout, navigationBarHeight: navigationHeight, transition: .immediate)
|
||||||
|
|||||||
@ -54,6 +54,8 @@ public final class GalleryFooterNode: ASDisplayNode {
|
|||||||
}
|
}
|
||||||
self.addSubnode(footerContentNode)
|
self.addSubnode(footerContentNode)
|
||||||
}
|
}
|
||||||
|
} else if let _ = self.currentThumbnailPanelHeight {
|
||||||
|
self.currentThumbnailPanelHeight = thumbnailPanelHeight
|
||||||
}
|
}
|
||||||
|
|
||||||
var animateOverlayIn = false
|
var animateOverlayIn = false
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user