mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Various fixes
This commit is contained in:
parent
6cfd4655e4
commit
f1435301d3
@ -337,7 +337,6 @@ open class GalleryControllerNode: ASDisplayNode, UIScrollViewDelegate, UIGesture
|
|||||||
|
|
||||||
open func animateIn(animateContent: Bool, useSimpleAnimation: Bool) {
|
open func animateIn(animateContent: Bool, useSimpleAnimation: Bool) {
|
||||||
let duration: Double = animateContent ? 0.2 : 0.3
|
let duration: Double = animateContent ? 0.2 : 0.3
|
||||||
let fadeDuration: Double = 0.2
|
|
||||||
|
|
||||||
let backgroundColor = self.backgroundNode.backgroundColor ?? .black
|
let backgroundColor = self.backgroundNode.backgroundColor ?? .black
|
||||||
|
|
||||||
@ -346,9 +345,9 @@ open class GalleryControllerNode: ASDisplayNode, UIScrollViewDelegate, UIGesture
|
|||||||
self.footerNode.alpha = 0.0
|
self.footerNode.alpha = 0.0
|
||||||
self.currentThumbnailContainerNode?.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 {
|
if !self.areControlsHidden {
|
||||||
self.statusBar?.alpha = 1.0
|
self.statusBar?.alpha = 1.0
|
||||||
self.navigationBar?.alpha = 1.0
|
self.navigationBar?.alpha = 1.0
|
||||||
|
@ -173,6 +173,14 @@ public final class GalleryThumbnailContainerNode: ASDisplayNode, UIScrollViewDel
|
|||||||
self.scrollNode.view.contentSize = contentSize
|
self.scrollNode.view.contentSize = contentSize
|
||||||
updated = true
|
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 {
|
if updated || !self.isPanning {
|
||||||
transition.animateView {
|
transition.animateView {
|
||||||
@ -180,7 +188,6 @@ public final class GalleryThumbnailContainerNode: ASDisplayNode, UIScrollViewDel
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let progress = progress ?? 0.0
|
|
||||||
var itemFrames: [CGRect] = []
|
var itemFrames: [CGRect] = []
|
||||||
var lastTrailingSpacing: CGFloat = 0.0
|
var lastTrailingSpacing: CGFloat = 0.0
|
||||||
var xOffset: CGFloat = -itemBaseSize.width / 2.0
|
var xOffset: CGFloat = -itemBaseSize.width / 2.0
|
||||||
|
@ -1419,7 +1419,7 @@ final class UniversalVideoGalleryItemNode: ZoomableContentGalleryItemNode {
|
|||||||
|
|
||||||
if isAnimated || disablePlayerControls {
|
if isAnimated || disablePlayerControls {
|
||||||
strongSelf.footerContentNode.content = .info
|
strongSelf.footerContentNode.content = .info
|
||||||
} else if isPaused && !strongSelf.ignorePauseStatus {
|
} else if isPaused && !strongSelf.ignorePauseStatus && strongSelf.isCentral == true {
|
||||||
if hasStarted || strongSelf.didPause {
|
if hasStarted || strongSelf.didPause {
|
||||||
strongSelf.footerContentNode.content = .playback(paused: true, seekable: seekable)
|
strongSelf.footerContentNode.content = .playback(paused: true, seekable: seekable)
|
||||||
} else if let fetchStatus = fetchStatus, !strongSelf.requiresDownload {
|
} 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 |
Loading…
x
Reference in New Issue
Block a user