mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-11-06 17:00:13 +00:00
Emoji fixes
This commit is contained in:
parent
b54237c314
commit
e966494588
@ -1643,10 +1643,19 @@ class ChatMessageAnimatedStickerItemNode: ChatMessageItemView {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private func commitEnqueuedAnimations() {
|
private func commitEnqueuedAnimations() {
|
||||||
guard let item = self.item, let file = self.emojiFile, !self.enqueuedAdditionalAnimations.isEmpty else {
|
guard let item = self.item, !self.enqueuedAdditionalAnimations.isEmpty else {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
guard let file = self.emojiFile else {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
var emojiFile = self.emojiFile
|
||||||
|
if emojiFile == nil {
|
||||||
|
emojiFile = item.message.associatedMedia.first?.value as? TelegramMediaFile
|
||||||
|
}
|
||||||
|
|
||||||
let enqueuedAnimations = self.enqueuedAdditionalAnimations
|
let enqueuedAnimations = self.enqueuedAdditionalAnimations
|
||||||
self.enqueuedAdditionalAnimations.removeAll()
|
self.enqueuedAdditionalAnimations.removeAll()
|
||||||
|
|
||||||
@ -2630,7 +2639,7 @@ private func fontSizeForEmojiString(_ string: String) -> CGFloat {
|
|||||||
|
|
||||||
var maxLineLength = 0
|
var maxLineLength = 0
|
||||||
for line in lines {
|
for line in lines {
|
||||||
maxLineLength = max(maxLineLength, line.count)
|
maxLineLength = max(maxLineLength, line.replacingOccurrences(of: " ", with: "").count)
|
||||||
}
|
}
|
||||||
|
|
||||||
let linesCount = lines.count
|
let linesCount = lines.count
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user