mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 14:45:21 +00:00
Fix animation
This commit is contained in:
@@ -1285,6 +1285,9 @@ public final class ChatControllerImpl: TelegramBaseController, ChatController, G
|
||||
guard let message = messages.first else {
|
||||
return
|
||||
}
|
||||
if case .default = reaction, strongSelf.chatLocation.peerId == strongSelf.context.account.peerId {
|
||||
return
|
||||
}
|
||||
|
||||
if !force && message.areReactionsTags(accountPeerId: strongSelf.context.account.peerId) {
|
||||
if case .pinnedMessages = strongSelf.subject {
|
||||
|
||||
@@ -29,7 +29,14 @@ private func extractAnimatedTextString(string: PresentationStrings.FormattedStri
|
||||
textItems.append(AnimatedTextComponent.Item(id: AnyHashable("\(id)_text_before_\(range.index)"), isUnbreakable: true, content: .text(nsString.substring(with: NSRange(location: previousIndex, length: range.range.lowerBound - previousIndex)))))
|
||||
}
|
||||
if let value = mapping[range.index] {
|
||||
textItems.append(AnimatedTextComponent.Item(id: AnyHashable("\(id)_item_\(range.index)"), content: value))
|
||||
let isUnbreakable: Bool
|
||||
switch value {
|
||||
case .text:
|
||||
isUnbreakable = true
|
||||
case .number:
|
||||
isUnbreakable = false
|
||||
}
|
||||
textItems.append(AnimatedTextComponent.Item(id: AnyHashable("\(id)_item_\(range.index)"), isUnbreakable: isUnbreakable, content: value))
|
||||
}
|
||||
previousIndex = range.range.upperBound
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user