Various improvements

This commit is contained in:
Ilya Laktyushin
2025-01-27 23:44:07 +04:00
parent 6bf08c72ad
commit 10ac25e1cb
42 changed files with 1966 additions and 1095 deletions

View File

@@ -572,14 +572,16 @@ public final class EntityKeyboardComponent: Component {
for itemGroup in emojiContent.panelItemGroups {
if !itemGroup.items.isEmpty {
if let id = itemGroup.groupId.base as? String, id != "peerSpecific" {
if id == "recent" || id == "liked" {
if id == "recent" || id == "liked" || id == "collectible" {
let iconMapping: [String: EntityKeyboardIconTopPanelComponent.Icon] = [
"recent": .recent,
"liked": .liked,
"collectible": .collectible
]
let titleMapping: [String: String] = [
"recent": component.strings.Stickers_Recent,
"liked": "",
"collectible": ""
]
if let icon = iconMapping[id], let title = titleMapping[id] {
topEmojiItems.append(EntityKeyboardTopPanelComponent.Item(

View File

@@ -277,6 +277,7 @@ final class EntityKeyboardIconTopPanelComponent: Component {
case saved
case premium
case liked
case collectible
}
let icon: Icon
@@ -363,6 +364,8 @@ final class EntityKeyboardIconTopPanelComponent: Component {
image = UIImage(bundleImageName: "Chat/Input/Media/PanelSavedIcon")
case .liked:
image = UIImage(bundleImageName: "Chat/Input/Media/PanelHeartIcon")?.withRenderingMode(.alwaysTemplate)
case .collectible:
image = UIImage(bundleImageName: "Chat/Input/Media/PanelCollectibleIcon")?.withRenderingMode(.alwaysTemplate)
case .premium:
image = generateImage(CGSize(width: 44.0, height: 44.0), contextGenerator: { size, context in
context.clear(CGRect(origin: CGPoint(), size: size))