mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-16 11:20:18 +00:00
Attachment menu improvements
This commit is contained in:
parent
ed4e86742d
commit
93476cf662
@ -127,6 +127,7 @@ public class ImageNode: ASDisplayNode {
|
|||||||
private var first = true
|
private var first = true
|
||||||
private let enableEmpty: Bool
|
private let enableEmpty: Bool
|
||||||
public var enableAnimatedTransition: Bool
|
public var enableAnimatedTransition: Bool
|
||||||
|
public var animateFirstTransition = true
|
||||||
|
|
||||||
private let _contentReady = Promise<Bool>()
|
private let _contentReady = Promise<Bool>()
|
||||||
private var didSetReady: Bool = false
|
private var didSetReady: Bool = false
|
||||||
@ -166,7 +167,7 @@ public class ImageNode: ASDisplayNode {
|
|||||||
if strongSelf.first && next != nil {
|
if strongSelf.first && next != nil {
|
||||||
strongSelf.first = false
|
strongSelf.first = false
|
||||||
animate = false
|
animate = false
|
||||||
if strongSelf.isNodeLoaded {
|
if strongSelf.isNodeLoaded && strongSelf.animateFirstTransition {
|
||||||
strongSelf.layer.animateAlpha(from: 0.0, to: 1.0, duration: 0.18)
|
strongSelf.layer.animateAlpha(from: 0.0, to: 1.0, duration: 0.18)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -121,6 +121,7 @@ private final class MediaGroupsGridAlbumItemNode : ListViewItemNode {
|
|||||||
self.imageNode.clipsToBounds = true
|
self.imageNode.clipsToBounds = true
|
||||||
self.imageNode.frame = CGRect(origin: CGPoint(), size: CGSize(width: 62.0, height: 62.0))
|
self.imageNode.frame = CGRect(origin: CGPoint(), size: CGSize(width: 62.0, height: 62.0))
|
||||||
self.imageNode.contentMode = .scaleAspectFill
|
self.imageNode.contentMode = .scaleAspectFill
|
||||||
|
self.imageNode.animateFirstTransition = false
|
||||||
|
|
||||||
self.titleNode = TextNode()
|
self.titleNode = TextNode()
|
||||||
self.titleNode.isUserInteractionEnabled = false
|
self.titleNode.isUserInteractionEnabled = false
|
||||||
|
|||||||
@ -84,6 +84,7 @@ final class MediaPickerGridItemNode: GridItemNode {
|
|||||||
self.imageNode.clipsToBounds = true
|
self.imageNode.clipsToBounds = true
|
||||||
self.imageNode.contentMode = .scaleAspectFill
|
self.imageNode.contentMode = .scaleAspectFill
|
||||||
self.imageNode.isLayerBacked = false
|
self.imageNode.isLayerBacked = false
|
||||||
|
self.imageNode.animateFirstTransition = false
|
||||||
|
|
||||||
self.gradientNode = ASImageNode()
|
self.gradientNode = ASImageNode()
|
||||||
self.gradientNode.displaysAsynchronously = false
|
self.gradientNode.displaysAsynchronously = false
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user