Various fixes

This commit is contained in:
Ilya Laktyushin
2020-12-19 03:16:15 +04:00
parent c4cd3c318a
commit f91cc7f744
22 changed files with 93 additions and 29 deletions

View File

@@ -2636,7 +2636,7 @@ class ChatMessageBubbleItemNode: ChatMessageItemView, ChatMessagePreviewItemNode
let offset: CGFloat = params.leftInset + (incoming ? 42.0 : 0.0)
let selectionFrame = CGRect(origin: CGPoint(x: -offset, y: 0.0), size: CGSize(width: params.width, height: layout.contentSize.height))
strongSelf.selectionNode?.frame = selectionFrame
strongSelf.selectionNode?.updateLayout(size: selectionFrame.size)
strongSelf.selectionNode?.updateLayout(size: selectionFrame.size, leftInset: params.leftInset)
if let actionButtonsSizeAndApply = actionButtonsSizeAndApply {
var animated = false
@@ -3446,7 +3446,7 @@ class ChatMessageBubbleItemNode: ChatMessageItemView, ChatMessagePreviewItemNode
selectionNode.updateSelected(selected, animated: animated)
let selectionFrame = CGRect(origin: CGPoint(x: -offset, y: 0.0), size: CGSize(width: self.contentSize.width, height: self.contentSize.height))
selectionNode.frame = selectionFrame
selectionNode.updateLayout(size: selectionFrame.size)
selectionNode.updateLayout(size: selectionFrame.size, leftInset: self.safeInsets.left)
self.subnodeTransform = CATransform3DMakeTranslation(offset, 0.0, 0.0);
} else {
let selectionNode = ChatMessageSelectionNode(wallpaper: item.presentationData.theme.wallpaper, theme: item.presentationData.theme.theme, toggle: { [weak self] value in
@@ -3462,7 +3462,7 @@ class ChatMessageBubbleItemNode: ChatMessageItemView, ChatMessagePreviewItemNode
let selectionFrame = CGRect(origin: CGPoint(x: -offset, y: 0.0), size: CGSize(width: self.contentSize.width, height: self.contentSize.height))
selectionNode.frame = selectionFrame
selectionNode.updateLayout(size: selectionFrame.size)
selectionNode.updateLayout(size: selectionFrame.size, leftInset: self.safeInsets.left)
self.insertSubnode(selectionNode, belowSubnode: self.messageAccessibilityArea)
self.selectionNode = selectionNode
selectionNode.updateSelected(selected, animated: false)