Fix overflow

This commit is contained in:
Ali 2023-03-01 22:06:44 +04:00
parent fad6258c61
commit 30f9746d16

View File

@ -617,8 +617,13 @@ public final class ReactionListContextMenuContent: ContextControllerItemsContent
)).string )).string
text = dateText text = dateText
} }
/*#if DEBUG
text = "yesterday at 12:00 PM"
#endif*/
self.textLabelNode.attributedText = NSAttributedString(string: text, font: Font.regular(15.0), textColor: presentationData.theme.contextMenu.secondaryColor) self.textLabelNode.attributedText = NSAttributedString(string: text, font: Font.regular(15.0), textColor: presentationData.theme.contextMenu.secondaryColor)
let textSize = self.textLabelNode.updateLayout(CGSize(width: maxTextWidth - 18.0, height: 100.0)) let textSize = self.textLabelNode.updateLayout(CGSize(width: maxTextWidth + 16.0, height: 100.0))
self.textLabelNode.isHidden = !self.displayReadTimestamps || text.isEmpty self.textLabelNode.isHidden = !self.displayReadTimestamps || text.isEmpty
let textSpacing: CGFloat = 2.0 let textSpacing: CGFloat = 2.0
@ -1230,7 +1235,7 @@ public final class ReactionListContextMenuContent: ContextControllerItemsContent
} }
func update(presentationData: PresentationData, constrainedWidth: CGFloat, maxHeight: CGFloat, bottomInset: CGFloat, transition: ContainedViewLayoutTransition) -> (cleanSize: CGSize, apparentHeight: CGFloat) { func update(presentationData: PresentationData, constrainedWidth: CGFloat, maxHeight: CGFloat, bottomInset: CGFloat, transition: ContainedViewLayoutTransition) -> (cleanSize: CGSize, apparentHeight: CGFloat) {
let constrainedSize = CGSize(width: min(260.0, constrainedWidth), height: maxHeight) let constrainedSize = CGSize(width: min(self.displayReadTimestamps ? 280.0 : 260.0, constrainedWidth), height: maxHeight)
var topContentHeight: CGFloat = 0.0 var topContentHeight: CGFloat = 0.0
if let backButtonNode = self.backButtonNode { if let backButtonNode = self.backButtonNode {