mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-10-09 03:20:48 +00:00
Video avatar fixes
This commit is contained in:
parent
a1d8287991
commit
f7f7afcc29
@ -935,6 +935,7 @@ public class GalleryController: ViewController, StandalonePresentableController
|
||||
|
||||
self.galleryNode.controlsVisibilityChanged = { [weak self] visible in
|
||||
self?.prefersOnScreenNavigationHidden = !visible
|
||||
self?.galleryNode.pager.centralItemNode()?.controlsVisibilityUpdated(isVisible: visible)
|
||||
}
|
||||
|
||||
let baseNavigationController = self.baseNavigationController
|
||||
|
@ -82,6 +82,9 @@ open class GalleryItemNode: ASDisplayNode {
|
||||
open func visibilityUpdated(isVisible: Bool) {
|
||||
}
|
||||
|
||||
open func controlsVisibilityUpdated(isVisible: Bool) {
|
||||
}
|
||||
|
||||
open func animateIn(from node: (ASDisplayNode, CGRect, () -> (UIView?, UIView?)), addToTransitionSurface: (UIView) -> Void, completion: @escaping () -> Void) {
|
||||
}
|
||||
|
||||
|
@ -661,7 +661,9 @@ final class UniversalVideoGalleryItemNode: ZoomableContentGalleryItemNode {
|
||||
seekable = value.duration >= 30.0
|
||||
}
|
||||
|
||||
if playing && strongSelf.previousPlaying != true && !disablePlayerControls {
|
||||
if strongSelf.isCentral && playing && strongSelf.previousPlaying != true && !disablePlayerControls {
|
||||
strongSelf.controlsTimer?.invalidate()
|
||||
|
||||
let timer = SwiftSignalKit.Timer(timeout: 3.0, repeat: false, completion: { [weak self] in
|
||||
self?.updateControlsVisibility(false)
|
||||
self?.controlsTimer = nil
|
||||
@ -762,6 +764,11 @@ final class UniversalVideoGalleryItemNode: ZoomableContentGalleryItemNode {
|
||||
self.footerContentNode.setup(origin: item.originData, caption: item.caption)
|
||||
}
|
||||
|
||||
override func controlsVisibilityUpdated(isVisible: Bool) {
|
||||
self.controlsTimer?.invalidate()
|
||||
self.controlsTimer = nil
|
||||
}
|
||||
|
||||
private func updateDisplayPlaceholder(_ displayPlaceholder: Bool) {
|
||||
if displayPlaceholder {
|
||||
if self.pictureInPictureNode == nil {
|
||||
|
Loading…
x
Reference in New Issue
Block a user