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