Various improvements

This commit is contained in:
Ilya Laktyushin
2020-10-14 01:49:49 +04:00
parent 645bd9789b
commit 36d705576a
45 changed files with 5041 additions and 4271 deletions

View File

@@ -327,10 +327,10 @@ class ChatMessageAnimatedStickerItemNode: ChatMessageItemView {
}
if let telegramDice = self.telegramDice {
// if telegramDice.emoji == "🎲" {
// let animationNode = SlotMachineAnimationNode(context: item.context)
// self.animationNode = animationNode
// } else {
if telegramDice.emoji == "🎰" {
let animationNode = SlotMachineAnimationNode(context: item.context)
self.animationNode = animationNode
} else {
let animationNode = ManagedDiceAnimationNode(context: item.context, emoji: telegramDice.emoji.strippedEmoji)
if !item.message.effectivelyIncoming(item.context.account.peerId) {
animationNode.success = { [weak self] in
@@ -340,7 +340,7 @@ class ChatMessageAnimatedStickerItemNode: ChatMessageItemView {
}
}
self.animationNode = animationNode
// }
}
} else {
let animationNode: AnimatedStickerNode
if let (node, parentNode, listNode, greetingCompletion) = item.controllerInteraction.greetingStickerNode(), let greetingStickerNode = node as? AnimatedStickerNode {
@@ -1478,7 +1478,7 @@ class ChatMessageAnimatedStickerItemNode: ChatMessageItemView {
self.layer.animateAlpha(from: 0.0, to: 1.0, duration: 0.2)
}
override func getMessageContextSourceNode() -> ContextExtractedContentContainingNode? {
override func getMessageContextSourceNode(stableId: UInt32?) -> ContextExtractedContentContainingNode? {
return self.contextSourceNode
}