Various improvements

This commit is contained in:
Ilya Laktyushin
2022-05-20 23:11:45 +04:00
parent 10326f1fac
commit 4b41660767
53 changed files with 1357 additions and 522 deletions

View File

@@ -1723,10 +1723,21 @@ class ChatMessageAnimatedStickerItemNode: ChatMessageItemView {
}
if let item = self.item, self.imageNode.frame.contains(location) {
if let _ = self.telegramFile {
return .optionalAction({
let _ = item.controllerInteraction.openMessage(item.message, .default)
})
if let file = self.telegramFile {
if file.isPremiumSticker {
return .optionalAction({
if self.additionalAnimationNodes.isEmpty {
self.playedPremiumStickerAnimation = false
self.playPremiumStickerAnimation()
} else {
item.controllerInteraction.displayPremiumStickerTooltip(file, item.message)
}
})
} else {
return .optionalAction({
let _ = item.controllerInteraction.openMessage(item.message, .default)
})
}
} else if let dice = self.telegramDice {
return .optionalAction({
item.controllerInteraction.displayDiceTooltip(dice)