mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-11-07 17:30:12 +00:00
Fix reaction highlight
This commit is contained in:
parent
9a71712032
commit
0b6a974d47
@ -162,7 +162,9 @@ public final class ReactionContextNode: ASDisplayNode, UIScrollViewDelegate {
|
|||||||
rect.origin.x = max(sideInset, rect.origin.x)
|
rect.origin.x = max(sideInset, rect.origin.x)
|
||||||
rect.origin.y = max(insets.top + sideInset, rect.origin.y)
|
rect.origin.y = max(insets.top + sideInset, rect.origin.y)
|
||||||
rect.origin.x = min(containerSize.width - contentSize.width - sideInset, rect.origin.x)
|
rect.origin.x = min(containerSize.width - contentSize.width - sideInset, rect.origin.x)
|
||||||
if rect.maxX > containerSize.width - sideInset {
|
|
||||||
|
let rightEdge = containerSize.width - sideInset
|
||||||
|
if rect.maxX > rightEdge {
|
||||||
rect.origin.x = containerSize.width - sideInset - rect.width
|
rect.origin.x = containerSize.width - sideInset - rect.width
|
||||||
}
|
}
|
||||||
if rect.minX < sideInset {
|
if rect.minX < sideInset {
|
||||||
@ -178,6 +180,7 @@ public final class ReactionContextNode: ASDisplayNode, UIScrollViewDelegate {
|
|||||||
|
|
||||||
if self.highlightedReaction != nil {
|
if self.highlightedReaction != nil {
|
||||||
rect.origin.x -= 2.0
|
rect.origin.x -= 2.0
|
||||||
|
rect.size.width += 4.0
|
||||||
}
|
}
|
||||||
|
|
||||||
return (rect, isLeftAligned, cloudSourcePoint)
|
return (rect, isLeftAligned, cloudSourcePoint)
|
||||||
@ -295,9 +298,6 @@ public final class ReactionContextNode: ASDisplayNode, UIScrollViewDelegate {
|
|||||||
if visibleContentWidth > size.width - sideInset * 2.0 {
|
if visibleContentWidth > size.width - sideInset * 2.0 {
|
||||||
visibleContentWidth = size.width - sideInset * 2.0
|
visibleContentWidth = size.width - sideInset * 2.0
|
||||||
}
|
}
|
||||||
if self.highlightedReaction != nil {
|
|
||||||
visibleContentWidth += 4.0
|
|
||||||
}
|
|
||||||
|
|
||||||
let contentHeight = verticalInset * 2.0 + rowHeight
|
let contentHeight = verticalInset * 2.0 + rowHeight
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user