Various fixes

This commit is contained in:
Ilya Laktyushin
2025-03-27 18:36:25 +04:00
parent 19e37d149b
commit d423ebeac0
2 changed files with 8 additions and 4 deletions

View File

@@ -420,7 +420,7 @@ public final class GiftItemComponent: Component {
}
var animationTransition = transition
if self.animationFile != animationFile, let emoji {
if self.animationLayer == nil || self.animationFile != animationFile, let emoji {
animationTransition = .immediate
self.animationFile = animationFile
if let animationLayer = self.animationLayer {

View File

@@ -236,9 +236,13 @@ final class PeerInfoHeaderNavigationButtonContainerNode: SparseNode {
buttonNode.alpha = 0.0
transition.updateAlpha(node: buttonNode, alpha: alphaFactor * alphaFactor)
transition.updateSublayerTransformOffset(layer: buttonNode.layer, offset: CGPoint(x: accumulatedRightButtonOffset, y: 0.0))
if self.backgroundContentColor.alpha != 0.0 {
accumulatedRightButtonOffset -= 6.0
if !spec.isForExpandedView {
transition.updateSublayerTransformOffset(layer: buttonNode.layer, offset: CGPoint(x: accumulatedRightButtonOffset, y: 0.0))
if self.backgroundContentColor.alpha != 0.0 {
accumulatedRightButtonOffset -= 6.0
}
} else {
transition.updateSublayerTransformOffset(layer: buttonNode.layer, offset: .zero)
}
} else {
transition.updateFrameAdditiveToCenter(node: buttonNode, frame: buttonFrame)