mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 14:20:20 +00:00
UI and theme improvements
This commit is contained in:
@@ -1680,7 +1680,7 @@ class ChatMessageAnimatedStickerItemNode: ChatMessageItemView {
|
||||
self.contextSourceNode.contentNode.addSubnode(accessoryItemNode)
|
||||
}
|
||||
|
||||
func animateContentFromTextInputField(textInput: ChatMessageTransitionNode.Source.TextInput, transition: ContainedViewLayoutTransition) {
|
||||
func animateContentFromTextInputField(textInput: ChatMessageTransitionNode.Source.TextInput, transition: CombinedTransition) {
|
||||
guard let _ = self.item else {
|
||||
return
|
||||
}
|
||||
@@ -1710,14 +1710,14 @@ class ChatMessageAnimatedStickerItemNode: ChatMessageItemView {
|
||||
y: sourceCenter.y - self.imageNode.frame.midY
|
||||
)
|
||||
|
||||
transition.animatePositionAdditive(node: self.imageNode, offset: offset)
|
||||
transition.animateTransformScale(node: self.imageNode, from: sourceScale)
|
||||
transition.animatePositionAdditive(layer: self.imageNode.layer, offset: offset)
|
||||
transition.horizontal.animateTransformScale(node: self.imageNode, from: sourceScale)
|
||||
if let animationNode = self.animationNode {
|
||||
transition.animatePositionAdditive(node: animationNode, offset: offset)
|
||||
transition.animateTransformScale(node: animationNode, from: sourceScale)
|
||||
transition.animatePositionAdditive(layer: animationNode.layer, offset: offset)
|
||||
transition.horizontal.animateTransformScale(node: animationNode, from: sourceScale)
|
||||
}
|
||||
transition.animatePositionAdditive(node: self.placeholderNode, offset: offset)
|
||||
transition.animateTransformScale(node: self.placeholderNode, from: sourceScale)
|
||||
transition.animatePositionAdditive(layer: self.placeholderNode.layer, offset: offset)
|
||||
transition.horizontal.animateTransformScale(node: self.placeholderNode, from: sourceScale)
|
||||
|
||||
let inverseScale = 1.0 / sourceScale
|
||||
|
||||
@@ -1725,7 +1725,7 @@ class ChatMessageAnimatedStickerItemNode: ChatMessageItemView {
|
||||
x: -offset.x - localSourceOffset.x * (inverseScale - 1.0),
|
||||
y: -offset.y - localSourceOffset.y * (inverseScale - 1.0)
|
||||
), removeOnCompletion: false)
|
||||
transition.updateTransformScale(layer: textInput.contentView.layer, scale: 1.0 / sourceScale)
|
||||
transition.horizontal.updateTransformScale(layer: textInput.contentView.layer, scale: 1.0 / sourceScale)
|
||||
|
||||
textInput.contentView.layer.animateAlpha(from: 1.0, to: 0.0, duration: 0.15, removeOnCompletion: false, completion: { _ in
|
||||
textInput.contentView.removeFromSuperview()
|
||||
@@ -1740,7 +1740,7 @@ class ChatMessageAnimatedStickerItemNode: ChatMessageItemView {
|
||||
self.dateAndStatusNode.layer.animateAlpha(from: 0.0, to: self.dateAndStatusNode.alpha, duration: 0.15, delay: 0.16)
|
||||
}
|
||||
|
||||
func animateContentFromStickerGridItem(stickerSource: ChatMessageTransitionNode.Sticker, transition: ContainedViewLayoutTransition) {
|
||||
func animateContentFromStickerGridItem(stickerSource: ChatMessageTransitionNode.Sticker, transition: CombinedTransition) {
|
||||
guard let _ = self.item else {
|
||||
return
|
||||
}
|
||||
@@ -1785,14 +1785,14 @@ class ChatMessageAnimatedStickerItemNode: ChatMessageItemView {
|
||||
y: sourceCenter.y - self.imageNode.frame.midY
|
||||
)
|
||||
|
||||
transition.animatePositionAdditive(node: self.imageNode, offset: offset)
|
||||
transition.animateTransformScale(node: self.imageNode, from: sourceScale)
|
||||
transition.animatePositionAdditive(layer: self.imageNode.layer, offset: offset)
|
||||
transition.horizontal.animateTransformScale(node: self.imageNode, from: sourceScale)
|
||||
if let animationNode = self.animationNode {
|
||||
transition.animatePositionAdditive(node: animationNode, offset: offset)
|
||||
transition.animateTransformScale(node: animationNode, from: sourceScale)
|
||||
transition.animatePositionAdditive(layer: animationNode.layer, offset: offset)
|
||||
transition.horizontal.animateTransformScale(node: animationNode, from: sourceScale)
|
||||
}
|
||||
transition.animatePositionAdditive(node: self.placeholderNode, offset: offset)
|
||||
transition.animateTransformScale(node: self.placeholderNode, from: sourceScale)
|
||||
transition.animatePositionAdditive(layer: self.placeholderNode.layer, offset: offset)
|
||||
transition.horizontal.animateTransformScale(node: self.placeholderNode, from: sourceScale)
|
||||
|
||||
let inverseScale = 1.0 / sourceScale
|
||||
|
||||
@@ -1801,7 +1801,7 @@ class ChatMessageAnimatedStickerItemNode: ChatMessageItemView {
|
||||
x: -offset.x - localSourceOffset.x * (inverseScale - 1.0),
|
||||
y: -offset.y - localSourceOffset.y * (inverseScale - 1.0)
|
||||
), removeOnCompletion: false)
|
||||
transition.updateTransformScale(layer: snapshotView.layer, scale: 1.0 / sourceScale)
|
||||
transition.horizontal.updateTransformScale(layer: snapshotView.layer, scale: 1.0 / sourceScale)
|
||||
|
||||
snapshotView.layer.animateAlpha(from: 1.0, to: 0.0, duration: 0.08, removeOnCompletion: false, completion: { [weak snapshotView] _ in
|
||||
snapshotView?.removeFromSuperview()
|
||||
@@ -1830,13 +1830,13 @@ class ChatMessageAnimatedStickerItemNode: ChatMessageItemView {
|
||||
}
|
||||
}
|
||||
|
||||
func animateReplyPanel(sourceReplyPanel: ChatMessageTransitionNode.ReplyPanel, transition: ContainedViewLayoutTransition) {
|
||||
func animateReplyPanel(sourceReplyPanel: ChatMessageTransitionNode.ReplyPanel, transition: CombinedTransition) {
|
||||
if let replyInfoNode = self.replyInfoNode {
|
||||
let localRect = self.contextSourceNode.contentNode.view.convert(sourceReplyPanel.relativeSourceRect, to: replyInfoNode.view)
|
||||
|
||||
let offset = replyInfoNode.animateFromInputPanel(sourceReplyPanel: sourceReplyPanel, localRect: localRect, horizontalTransition: transition, verticalTransition: transition)
|
||||
let offset = replyInfoNode.animateFromInputPanel(sourceReplyPanel: sourceReplyPanel, localRect: localRect, transition: transition)
|
||||
if let replyBackgroundNode = self.replyBackgroundNode {
|
||||
transition.animatePositionAdditive(node: replyBackgroundNode, offset: offset)
|
||||
transition.animatePositionAdditive(layer: replyBackgroundNode.layer, offset: offset)
|
||||
replyBackgroundNode.layer.animateAlpha(from: 0.0, to: 1.0, duration: 0.1)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user