Various fixes

This commit is contained in:
Ilya Laktyushin 2022-10-05 23:32:03 +03:00
parent 6cfd4655e4
commit f1435301d3
4 changed files with 11 additions and 5 deletions

View File

@ -337,7 +337,6 @@ open class GalleryControllerNode: ASDisplayNode, UIScrollViewDelegate, UIGesture
open func animateIn(animateContent: Bool, useSimpleAnimation: Bool) {
let duration: Double = animateContent ? 0.2 : 0.3
let fadeDuration: Double = 0.2
let backgroundColor = self.backgroundNode.backgroundColor ?? .black
@ -346,9 +345,9 @@ open class GalleryControllerNode: ASDisplayNode, UIScrollViewDelegate, UIGesture
self.footerNode.alpha = 0.0
self.currentThumbnailContainerNode?.alpha = 0.0
self.backgroundNode.layer.animate(from: backgroundColor.withAlphaComponent(0.0).cgColor, to: backgroundColor.cgColor, keyPath: "backgroundColor", timingFunction: CAMediaTimingFunctionName.linear.rawValue, duration: fadeDuration)
self.backgroundNode.layer.animate(from: backgroundColor.withAlphaComponent(0.0).cgColor, to: backgroundColor.cgColor, keyPath: "backgroundColor", timingFunction: CAMediaTimingFunctionName.linear.rawValue, duration: 0.15)
UIView.animate(withDuration: fadeDuration, delay: 0.0, options: [.curveLinear], animations: {
UIView.animate(withDuration: 0.15, delay: 0.0, options: [.curveLinear], animations: {
if !self.areControlsHidden {
self.statusBar?.alpha = 1.0
self.navigationBar?.alpha = 1.0

View File

@ -173,6 +173,14 @@ public final class GalleryThumbnailContainerNode: ASDisplayNode, UIScrollViewDel
self.scrollNode.view.contentSize = contentSize
updated = true
}
var progress = progress ?? 0.0
if centralIndex == 0 && progress < 0.0 {
progress = 0.0
} else if centralIndex == self.itemNodes.count - 1 && progress > 0.0 {
progress = 0.0
}
if updated || !self.isPanning {
transition.animateView {
@ -180,7 +188,6 @@ public final class GalleryThumbnailContainerNode: ASDisplayNode, UIScrollViewDel
}
}
let progress = progress ?? 0.0
var itemFrames: [CGRect] = []
var lastTrailingSpacing: CGFloat = 0.0
var xOffset: CGFloat = -itemBaseSize.width / 2.0

View File

@ -1419,7 +1419,7 @@ final class UniversalVideoGalleryItemNode: ZoomableContentGalleryItemNode {
if isAnimated || disablePlayerControls {
strongSelf.footerContentNode.content = .info
} else if isPaused && !strongSelf.ignorePauseStatus {
} else if isPaused && !strongSelf.ignorePauseStatus && strongSelf.isCentral == true {
if hasStarted || strongSelf.didPause {
strongSelf.footerContentNode.content = .playback(paused: true, seekable: seekable)
} else if let fetchStatus = fetchStatus, !strongSelf.requiresDownload {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 5.0 KiB