mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 22:55:00 +00:00
Fix emoji
This commit is contained in:
@@ -84,9 +84,6 @@ final class ChatMessageNotificationItemNode: NotificationItemNode {
|
|||||||
private var compact: Bool?
|
private var compact: Bool?
|
||||||
private var validLayout: CGFloat?
|
private var validLayout: CGFloat?
|
||||||
|
|
||||||
private var animationCache: AnimationCache?
|
|
||||||
private var multiAnimationRenderer: MultiAnimationRenderer?
|
|
||||||
|
|
||||||
override init() {
|
override init() {
|
||||||
self.avatarNode = AvatarNode(font: avatarFont)
|
self.avatarNode = AvatarNode(font: avatarFont)
|
||||||
|
|
||||||
@@ -115,8 +112,6 @@ final class ChatMessageNotificationItemNode: NotificationItemNode {
|
|||||||
func setupItem(_ item: ChatMessageNotificationItem, compact: Bool) {
|
func setupItem(_ item: ChatMessageNotificationItem, compact: Bool) {
|
||||||
self.item = item
|
self.item = item
|
||||||
|
|
||||||
self.animationCache = item.context.animationCache
|
|
||||||
|
|
||||||
self.compact = compact
|
self.compact = compact
|
||||||
if compact {
|
if compact {
|
||||||
self.avatarNode.font = compactAvatarFont
|
self.avatarNode.font = compactAvatarFont
|
||||||
@@ -412,12 +407,12 @@ final class ChatMessageNotificationItemNode: NotificationItemNode {
|
|||||||
let (textLayout, textApply) = makeTextLayout(TextNodeLayoutArguments(attributedString: self.textAttributedText, backgroundColor: nil, maximumNumberOfLines: 2, truncationType: .end, constrainedSize: CGSize(width: width - leftInset - rightInset, height: CGFloat.greatestFiniteMagnitude), alignment: .left, lineSpacing: 0.0, cutout: nil, insets: UIEdgeInsets()))
|
let (textLayout, textApply) = makeTextLayout(TextNodeLayoutArguments(attributedString: self.textAttributedText, backgroundColor: nil, maximumNumberOfLines: 2, truncationType: .end, constrainedSize: CGSize(width: width - leftInset - rightInset, height: CGFloat.greatestFiniteMagnitude), alignment: .left, lineSpacing: 0.0, cutout: nil, insets: UIEdgeInsets()))
|
||||||
let _ = titleApply()
|
let _ = titleApply()
|
||||||
|
|
||||||
if let item = self.item, let cache = self.animationCache, let renderer = self.multiAnimationRenderer {
|
if let item = self.item {
|
||||||
let theme = item.context.sharedContext.currentPresentationData.with({ $0 }).theme
|
let theme = item.context.sharedContext.currentPresentationData.with({ $0 }).theme
|
||||||
let _ = textApply(TextNodeWithEntities.Arguments(
|
let _ = textApply(TextNodeWithEntities.Arguments(
|
||||||
context: item.context,
|
context: item.context,
|
||||||
cache: cache,
|
cache: item.context.animationCache,
|
||||||
renderer: renderer,
|
renderer: item.context.animationRenderer,
|
||||||
placeholderColor: theme.list.mediaPlaceholderColor,
|
placeholderColor: theme.list.mediaPlaceholderColor,
|
||||||
attemptSynchronous: false
|
attemptSynchronous: false
|
||||||
))
|
))
|
||||||
|
|||||||
Reference in New Issue
Block a user