mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-16 11:20:18 +00:00
Update animation
This commit is contained in:
parent
d73c4b65e0
commit
0ab87d6bbc
@ -174,6 +174,10 @@ final class ChatMessageTransitionNode: ASDisplayNode {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func beginAnimation() {
|
func beginAnimation() {
|
||||||
|
let verticalDuration: Double = 0.5
|
||||||
|
let horizontalDuration: Double = verticalDuration * 0.5
|
||||||
|
let delay: Double = 0.0
|
||||||
|
|
||||||
switch self.source {
|
switch self.source {
|
||||||
case let .textInput(textInput, replyPanel):
|
case let .textInput(textInput, replyPanel):
|
||||||
self.contextSourceNode.isExtractedToContextPreview = true
|
self.contextSourceNode.isExtractedToContextPreview = true
|
||||||
@ -195,10 +199,6 @@ final class ChatMessageTransitionNode: ASDisplayNode {
|
|||||||
|
|
||||||
self.itemNode.cancelInsertionAnimations()
|
self.itemNode.cancelInsertionAnimations()
|
||||||
|
|
||||||
let verticalDuration: Double = 0.5
|
|
||||||
let horizontalDuration: Double = verticalDuration * 0.7
|
|
||||||
let delay: Double = 0.0
|
|
||||||
|
|
||||||
let transition: ContainedViewLayoutTransition = .animated(duration: horizontalDuration, curve: .custom(0.33, 0.0, 0.0, 1.0))
|
let transition: ContainedViewLayoutTransition = .animated(duration: horizontalDuration, curve: .custom(0.33, 0.0, 0.0, 1.0))
|
||||||
|
|
||||||
if let itemNode = self.itemNode as? ChatMessageBubbleItemNode {
|
if let itemNode = self.itemNode as? ChatMessageBubbleItemNode {
|
||||||
@ -264,10 +264,6 @@ final class ChatMessageTransitionNode: ASDisplayNode {
|
|||||||
|
|
||||||
self.itemNode.cancelInsertionAnimations()
|
self.itemNode.cancelInsertionAnimations()
|
||||||
|
|
||||||
let verticalDuration: Double = 0.5
|
|
||||||
let horizontalDuration: Double = verticalDuration * 0.25
|
|
||||||
let delay: Double = 0.0
|
|
||||||
|
|
||||||
let transition: ContainedViewLayoutTransition = .animated(duration: horizontalDuration, curve: .custom(0.33, 0.0, 0.0, 1.0))
|
let transition: ContainedViewLayoutTransition = .animated(duration: horizontalDuration, curve: .custom(0.33, 0.0, 0.0, 1.0))
|
||||||
|
|
||||||
if let itemNode = self.itemNode as? ChatMessageAnimatedStickerItemNode {
|
if let itemNode = self.itemNode as? ChatMessageAnimatedStickerItemNode {
|
||||||
@ -314,10 +310,6 @@ final class ChatMessageTransitionNode: ASDisplayNode {
|
|||||||
|
|
||||||
container.isHidden = true
|
container.isHidden = true
|
||||||
|
|
||||||
let verticalDuration: Double = 0.5
|
|
||||||
let horizontalDuration: Double = verticalDuration * 0.7
|
|
||||||
let delay: Double = 0.0
|
|
||||||
|
|
||||||
let transition: ContainedViewLayoutTransition = .animated(duration: horizontalDuration, curve: .custom(0.33, 0.0, 0.0, 1.0))
|
let transition: ContainedViewLayoutTransition = .animated(duration: horizontalDuration, curve: .custom(0.33, 0.0, 0.0, 1.0))
|
||||||
|
|
||||||
if let itemNode = self.itemNode as? ChatMessageBubbleItemNode {
|
if let itemNode = self.itemNode as? ChatMessageBubbleItemNode {
|
||||||
|
|||||||
@ -2182,9 +2182,14 @@ class ChatTextInputPanelNode: ChatInputPanelNode, ASEditableTextNodeDelegate {
|
|||||||
let backgroundView = UIImageView(image: backgroundImage)
|
let backgroundView = UIImageView(image: backgroundImage)
|
||||||
backgroundView.frame = self.textInputBackgroundNode.frame
|
backgroundView.frame = self.textInputBackgroundNode.frame
|
||||||
|
|
||||||
guard let contentView = textInputNode.view.snapshotView(afterScreenUpdates: false) else {
|
//let previousTintColor = textInputNode.view.tintColor
|
||||||
|
//textInputNode.view.tintColor = .clear
|
||||||
|
|
||||||
|
guard let contentView = textInputNode.view.snapshotView(afterScreenUpdates: true) else {
|
||||||
|
//textInputNode.view.tintColor = previousTintColor
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
//textInputNode.view.tintColor = previousTintColor
|
||||||
contentView.frame = textInputNode.frame
|
contentView.frame = textInputNode.frame
|
||||||
|
|
||||||
return ChatMessageTransitionNode.Source.TextInput(
|
return ChatMessageTransitionNode.Source.TextInput(
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user