Fix dynamic emoji colors

This commit is contained in:
Isaac 2024-12-28 03:00:03 +08:00
parent fd7b1cfe2b
commit 65d935e103
2 changed files with 4 additions and 1 deletions

View File

@ -744,6 +744,7 @@ public final class InlineStickerItemLayer: MultiAnimationRenderTarget {
self.loadAnimation()
} else {
let isTemplate = file.isCustomTemplateEmoji
self.updateTintColor()
let pointSize = arguments.pointSize
let placeholderColor = arguments.placeholderColor

View File

@ -1320,7 +1320,9 @@ public final class TextFieldComponent: Component {
return UIView()
}
let pointSize = floor(24.0 * 1.3)
return EmojiTextAttachmentView(context: component.context, userLocation: .other, emoji: emoji, file: emoji.file, cache: component.context.animationCache, renderer: component.context.animationRenderer, placeholderColor: UIColor.white.withAlphaComponent(0.12), pointSize: CGSize(width: pointSize, height: pointSize))
let emojiView = EmojiTextAttachmentView(context: component.context, userLocation: .other, emoji: emoji, file: emoji.file, cache: component.context.animationCache, renderer: component.context.animationRenderer, placeholderColor: UIColor.white.withAlphaComponent(0.12), pointSize: CGSize(width: pointSize, height: pointSize))
emojiView.updateTextColor(component.textColor)
return emojiView
}
self.chatInputTextNodeDidUpdateText()