Various fixes

This commit is contained in:
Ilya Laktyushin 2023-12-20 21:26:03 +04:00
parent 15cb8f9523
commit 8659a5d6ea
3 changed files with 3 additions and 11 deletions

View File

@ -1485,7 +1485,7 @@ open class TextNode: ASDisplayNode {
var blockQuotes: [TextNodeBlockQuote] = []
loop: for i in 0 ..< calculatedSegments.count {
for i in 0 ..< calculatedSegments.count {
let segment = calculatedSegments[i]
if i != 0 {
if segment.blockQuote != nil {
@ -1510,10 +1510,6 @@ open class TextNode: ASDisplayNode {
}
for line in segment.lines {
var isLastLine = false
if maximumNumberOfLines > 0 && lines.count == maximumNumberOfLines - 1 {
isLastLine = true
}
line.frame = CGRect(origin: CGPoint(x: line.frame.origin.x, y: -insets.bottom + size.height + line.frame.size.height), size: line.frame.size)
line.frame.size.width += max(0.0, segment.additionalWidth - 2.0)
//line.frame.size.width = max(blockWidth, line.frame.size.width)
@ -1579,10 +1575,6 @@ open class TextNode: ASDisplayNode {
}
lines.append(line)
if isLastLine {
break loop
}
}
let blockMaxY = size.height - insets.bottom

View File

@ -1887,7 +1887,7 @@ public class ChatMessageBubbleItemNode: ChatMessageItemView, ChatMessagePreviewI
} else {
bubbleReactions = ReactionsMessageAttribute(canViewList: false, reactions: [], recentPeers: [])
}
if !bubbleReactions.reactions.isEmpty {
if !bubbleReactions.reactions.isEmpty && !item.presentationData.isPreview {
bottomNodeMergeStatus = .Both
}

View File

@ -329,7 +329,7 @@ final class ThemeGridControllerNode: ASDisplayNode {
if let strongSelf = self, !strongSelf.currentState.editing {
let entries = previousEntries.with { $0 }
if let entries = entries, !entries.isEmpty {
let wallpapers = entries.map { $0.wallpaper }
let wallpapers = entries.map { $0.wallpaper }.filter { !$0.isColorOrGradient }
var options = WallpaperPresentationOptions()
if wallpaper == strongSelf.presentationData.chatWallpaper, let settings = wallpaper.settings {