Dice fixes

This commit is contained in:
Ilya Laktyushin
2020-04-26 21:06:57 +04:00
parent 5a6963b125
commit 9ec67698f5
6 changed files with 54 additions and 21 deletions

View File

@@ -210,6 +210,13 @@ class ChatMessageAnimatedStickerItemNode: ChatMessageItemView {
if let telegramDice = self.telegramDice {
let animationNode = ManagedDiceAnimationNode(context: item.context, emoji: telegramDice.emoji)
if !item.message.effectivelyIncoming(item.context.account.peerId) {
animationNode.success = { [weak self] in
if let strongSelf = self, let item = strongSelf.item {
item.controllerInteraction.animateDiceSuccess()
}
}
}
self.animationNode = animationNode
} else {
let animationNode = AnimatedStickerNode()