mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Hide scrubber in media preview
This commit is contained in:
parent
ae38464d11
commit
cea7cb24af
@ -1225,6 +1225,7 @@ public class GalleryController: ViewController, StandalonePresentableController
|
||||
self.adjustedForInitialPreviewingLayout = true
|
||||
self.galleryNode.setControlsHidden(true, animated: false)
|
||||
if let centralItemNode = self.galleryNode.pager.centralItemNode(), let itemSize = centralItemNode.contentSize() {
|
||||
centralItemNode.adjustForPreviewing()
|
||||
self.preferredContentSize = itemSize.aspectFitted(layout.size)
|
||||
self.containerLayoutUpdated(ContainerViewLayout(size: self.preferredContentSize, metrics: LayoutMetrics(), deviceMetrics: layout.deviceMetrics, intrinsicInsets: UIEdgeInsets(), safeInsets: UIEdgeInsets(), statusBarHeight: nil, inputHeight: nil, inputHeightIsInteractivellyChanging: false, inVoiceOver: false), transition: .immediate)
|
||||
}
|
||||
|
@ -85,6 +85,9 @@ open class GalleryItemNode: ASDisplayNode {
|
||||
open func controlsVisibilityUpdated(isVisible: Bool) {
|
||||
}
|
||||
|
||||
open func adjustForPreviewing() {
|
||||
}
|
||||
|
||||
open func animateIn(from node: (ASDisplayNode, CGRect, () -> (UIView?, UIView?)), addToTransitionSurface: (UIView) -> Void, completion: @escaping () -> Void) {
|
||||
}
|
||||
|
||||
|
@ -1537,6 +1537,12 @@ final class UniversalVideoGalleryItemNode: ZoomableContentGalleryItemNode {
|
||||
}
|
||||
}
|
||||
|
||||
override func adjustForPreviewing() {
|
||||
super.adjustForPreviewing()
|
||||
|
||||
self.scrubberView.isHidden = true
|
||||
}
|
||||
|
||||
override func footerContent() -> Signal<(GalleryFooterContentNode?, GalleryOverlayContentNode?), NoError> {
|
||||
return .single((self.footerContentNode, nil))
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user