mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 14:20:20 +00:00
Various improvements
This commit is contained in:
@@ -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(
|
||||
|
||||
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user