From 30f9746d16d33d6a89aacef204ff7b5aaffb56b7 Mon Sep 17 00:00:00 2001 From: Ali <> Date: Wed, 1 Mar 2023 22:06:44 +0400 Subject: [PATCH] Fix overflow --- .../Sources/ReactionListContextMenuContent.swift | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/submodules/Components/ReactionListContextMenuContent/Sources/ReactionListContextMenuContent.swift b/submodules/Components/ReactionListContextMenuContent/Sources/ReactionListContextMenuContent.swift index 20b1c4c2e1..4de82d3cd3 100644 --- a/submodules/Components/ReactionListContextMenuContent/Sources/ReactionListContextMenuContent.swift +++ b/submodules/Components/ReactionListContextMenuContent/Sources/ReactionListContextMenuContent.swift @@ -617,8 +617,13 @@ public final class ReactionListContextMenuContent: ContextControllerItemsContent )).string 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) - 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 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) { - 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 if let backButtonNode = self.backButtonNode {