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.galleryNode.controlsVisibilityChanged = { [weak self] visible in
|
||||||
self?.prefersOnScreenNavigationHidden = !visible
|
self?.prefersOnScreenNavigationHidden = !visible
|
||||||
|
self?.galleryNode.pager.centralItemNode()?.controlsVisibilityUpdated(isVisible: visible)
|
||||||
}
|
}
|
||||||
|
|
||||||
let baseNavigationController = self.baseNavigationController
|
let baseNavigationController = self.baseNavigationController
|
||||||
|
@ -82,6 +82,9 @@ open class GalleryItemNode: ASDisplayNode {
|
|||||||
open func visibilityUpdated(isVisible: Bool) {
|
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) {
|
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
|
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
|
let timer = SwiftSignalKit.Timer(timeout: 3.0, repeat: false, completion: { [weak self] in
|
||||||
self?.updateControlsVisibility(false)
|
self?.updateControlsVisibility(false)
|
||||||
self?.controlsTimer = nil
|
self?.controlsTimer = nil
|
||||||
@ -762,6 +764,11 @@ final class UniversalVideoGalleryItemNode: ZoomableContentGalleryItemNode {
|
|||||||
self.footerContentNode.setup(origin: item.originData, caption: item.caption)
|
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) {
|
private func updateDisplayPlaceholder(_ displayPlaceholder: Bool) {
|
||||||
if displayPlaceholder {
|
if displayPlaceholder {
|
||||||
if self.pictureInPictureNode == nil {
|
if self.pictureInPictureNode == nil {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user