mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 06:35:51 +00:00
Fix custom truncation token last line width
This commit is contained in:
@@ -494,6 +494,9 @@ public final class InteractiveTextNodeLayout: NSObject {
|
|||||||
public var trailingLineWidth: CGFloat {
|
public var trailingLineWidth: CGFloat {
|
||||||
if let lastSegment = self.segments.last, let lastLine = lastSegment.lines.last {
|
if let lastSegment = self.segments.last, let lastLine = lastSegment.lines.last {
|
||||||
var width = lastLine.frame.maxX
|
var width = lastLine.frame.maxX
|
||||||
|
if let additionalTrailingLine = lastLine.additionalTrailingLine {
|
||||||
|
width += additionalTrailingLine.1
|
||||||
|
}
|
||||||
|
|
||||||
if let blockQuote = lastSegment.blockQuote {
|
if let blockQuote = lastSegment.blockQuote {
|
||||||
if lastLine.frame.intersects(blockQuote.frame) {
|
if lastLine.frame.intersects(blockQuote.frame) {
|
||||||
@@ -1606,7 +1609,7 @@ open class InteractiveTextNode: ASDisplayNode, TextNodeProtocol, UIGestureRecogn
|
|||||||
spoilerWords: [],
|
spoilerWords: [],
|
||||||
embeddedItems: [],
|
embeddedItems: [],
|
||||||
attachments: [],
|
attachments: [],
|
||||||
additionalTrailingLine: (truncationToken, 0.0)
|
additionalTrailingLine: (truncationToken, truncationTokenWidth)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user