Support colored emoji

This commit is contained in:
Ali
2022-12-10 00:22:38 +04:00
parent 71bed257bb
commit 2cb2717ce7
28 changed files with 411 additions and 119 deletions

View File

@@ -116,7 +116,7 @@ final class EntityKeyboardAnimationTopPanelComponent: Component {
itemFile: nil,
subgroupId: nil,
icon: .none,
accentTint: false
tintMode: component.item.isTemplate ? .primary : .none
),
context: component.context,
attemptSynchronousLoad: false,
@@ -158,6 +158,15 @@ final class EntityKeyboardAnimationTopPanelComponent: Component {
}
itemLayer.update(transition: transition, size: iconFrame.size, badge: badge, blurredBadgeColor: UIColor(white: 0.0, alpha: 0.1), blurredBadgeBackgroundColor: component.theme.list.plainBackgroundColor)
switch itemLayer.item.tintMode {
case .none:
break
case .primary:
itemLayer.layerTintColor = component.theme.list.itemPrimaryTextColor.cgColor
case .accent:
itemLayer.layerTintColor = component.theme.list.itemAccentColor.cgColor
}
itemLayer.isVisibleForAnimations = true
}