Fix reactions positioning on outgoing instant videos

This commit is contained in:
Ilya Laktyushin 2022-10-25 09:19:53 +03:00
parent 66e2e45403
commit 0ffcbf0b06
2 changed files with 6 additions and 2 deletions

View File

@ -3097,7 +3097,11 @@ class ChatMessageBubbleItemNode: ChatMessageItemView, ChatMessagePreviewItemNode
if let reactionButtonsSizeAndApply = reactionButtonsSizeAndApply {
let reactionButtonsNode = reactionButtonsSizeAndApply.1(animation)
let reactionButtonsFrame = CGRect(origin: CGPoint(x: backgroundFrame.minX + (incoming ? layoutConstants.bubble.contentInsets.left : layoutConstants.bubble.contentInsets.right), y: backgroundFrame.maxY + reactionButtonsOffset + 4.0), size: reactionButtonsSizeAndApply.0)
var reactionButtonsFrame = CGRect(origin: CGPoint(x: backgroundFrame.minX + (incoming ? layoutConstants.bubble.contentInsets.left : layoutConstants.bubble.contentInsets.right), y: backgroundFrame.maxY + reactionButtonsOffset + 4.0), size: reactionButtonsSizeAndApply.0)
if !disablesComments && !incoming {
reactionButtonsFrame.origin.x = backgroundFrame.maxX - reactionButtonsSizeAndApply.0.width - layoutConstants.bubble.contentInsets.left
}
if reactionButtonsNode !== strongSelf.reactionButtonsNode {
strongSelf.reactionButtonsNode = reactionButtonsNode
reactionButtonsNode.reactionSelected = { [weak strongSelf] value in

View File

@ -1316,7 +1316,7 @@ class ChatMessageInteractiveInstantVideoNode: ASDisplayNode {
return self.view
}
if let videoNode = self.videoNode, videoNode.frame.contains(point) {
if let videoNode = self.videoNode, videoNode.view.frame.contains(point) {
return self.view
}
if !self.bounds.contains(point) {