Emoji improvements

This commit is contained in:
Ali
2022-07-24 03:15:19 +02:00
parent 3e8fe53f47
commit 3347f0514e
49 changed files with 569 additions and 1324 deletions

View File

@@ -956,7 +956,7 @@ final class ChatEntityKeyboardInputNode: ChatInputNode {
super.init()
self.topBackgroundExtension = 41.0
self.topBackgroundExtension = 34.0
self.followsDefaultHeight = true
self.view.addSubview(self.entityKeyboardView)
@@ -1036,6 +1036,8 @@ final class ChatEntityKeyboardInputNode: ChatInputNode {
},
openStickerSettings: {
},
openFeatured: {
},
addGroupAction: { [weak self, weak controllerInteraction] groupId, isPremiumLocked in
guard let controllerInteraction = controllerInteraction, let collectionId = groupId.base as? ItemCollectionId else {
return
@@ -1180,6 +1182,22 @@ final class ChatEntityKeyboardInputNode: ChatInputNode {
controller.navigationPresentation = .modal
controllerInteraction.navigationController()?.pushViewController(controller)
},
openFeatured: { [weak controllerInteraction] in
guard let controllerInteraction = controllerInteraction else {
return
}
controllerInteraction.navigationController()?.pushViewController(FeaturedStickersScreen(
context: context,
highlightedPackId: nil,
sendSticker: { [weak controllerInteraction] fileReference, sourceNode, sourceRect in
guard let controllerInteraction = controllerInteraction else {
return false
}
return controllerInteraction.sendSticker(fileReference, false, false, nil, false, sourceNode, sourceRect, nil)
}
))
},
addGroupAction: { groupId, isPremiumLocked in
guard let controllerInteraction = controllerInteraction, let collectionId = groupId.base as? ItemCollectionId else {
return
@@ -1492,7 +1510,7 @@ final class ChatEntityKeyboardInputNode: ChatInputNode {
transition: mappedTransition,
component: AnyComponent(EntityKeyboardComponent(
theme: interfaceState.theme,
bottomInset: bottomInset,
containerInsets: UIEdgeInsets(top: 0.0, left: leftInset, bottom: bottomInset, right: rightInset),
emojiContent: self.currentInputData.emoji,
stickerContent: stickerContent,
gifContent: gifContent?.component,
@@ -1841,6 +1859,8 @@ final class EntityInputView: UIView, AttachmentTextInputPanelInputView, UIInputV
},
openStickerSettings: {
},
openFeatured: {
},
addGroupAction: { _, _ in
},
clearGroup: { _ in