Merge branch 'master' of gitlab.com:peter-iakovlev/telegram-ios

This commit is contained in:
Ilya Laktyushin 2022-07-25 04:09:43 +03:00
commit 2709dc4c81
2 changed files with 7 additions and 2 deletions

View File

@ -3404,7 +3404,7 @@ public final class EmojiPagerContentComponent: Component {
itemTransition.setBounds(layer: itemLayer, bounds: CGRect(origin: CGPoint(), size: itemFrame.size))
if animateItemIn, !transition.animation.isImmediate {
if let previousItemPosition = previousItemPositions?[itemId], transitionHintInstalledGroupId != itemId.groupId {
if let previousItemPosition = previousItemPositions?[itemId], transitionHintInstalledGroupId != itemId.groupId, transitionHintExpandedGroupId != itemId.groupId {
itemTransition = transition
itemLayer.position = previousItemPosition
} else {
@ -3437,6 +3437,11 @@ public final class EmojiPagerContentComponent: Component {
}
}
if animateItemIn, !transition.animation.isImmediate, let contentAnimation = contentAnimation, case .groupExpanded(id: itemGroup.groupId) = contentAnimation.type, let placeholderView = self.visibleItemPlaceholderViews[itemId] {
placeholderView.layer.animateSpring(from: 0.1 as NSNumber, to: 1.0 as NSNumber, keyPath: "transform.scale", duration: 0.4)
placeholderView.layer.animateAlpha(from: 0.0, to: 1.0, duration: 0.1)
}
itemLayer.isVisibleForAnimations = true
}
}

View File

@ -1090,7 +1090,7 @@ final class EntityKeyboardTopPanelComponent: Component {
self.isExpanded = isExpanded
self.itemSize = self.isExpanded ? CGSize(width: 54.0, height: 68.0) : CGSize(width: 28.0, height: 28.0)
self.staticItemSize = self.itemSize
self.staticExpandedItemSize = self.isExpanded ? self.staticItemSize : CGSize(width: 126.0, height: 28.0)
self.staticExpandedItemSize = self.isExpanded ? self.staticItemSize : CGSize(width: 134.0, height: 28.0)
self.innerItemSize = self.isExpanded ? CGSize(width: 50.0, height: 62.0) : CGSize(width: 24.0, height: 24.0)
self.itemSpacing = 8.0