From 349dc03e17e8df07c45ef978cb7752453176911b Mon Sep 17 00:00:00 2001 From: Morgan Pretty Date: Wed, 18 Jan 2023 13:21:40 +1100 Subject: [PATCH] Added a secondary fallback for the timestamp in the context menu --- Session/Conversations/Context Menu/ContextMenuVC.swift | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Session/Conversations/Context Menu/ContextMenuVC.swift b/Session/Conversations/Context Menu/ContextMenuVC.swift index d68851588..3b4b1bbd2 100644 --- a/Session/Conversations/Context Menu/ContextMenuVC.swift +++ b/Session/Conversations/Context Menu/ContextMenuVC.swift @@ -71,10 +71,12 @@ final class ContextMenuVC: UIViewController { private lazy var fallbackTimestampLabel: UILabel = { let result: UILabel = UILabel() + result.setContentCompressionResistancePriority(.defaultLow, for: .horizontal) result.font = .systemFont(ofSize: Values.verySmallFontSize) result.text = cellViewModel.dateForUI.formattedForDisplay result.themeTextColor = .textPrimary result.alpha = 0 + result.numberOfLines = 2 return result }() @@ -187,10 +189,14 @@ final class ContextMenuVC: UIViewController { fallbackTimestampLabel.set(.height, to: ContextMenuVC.actionViewHeight) if cellViewModel.variant == .standardOutgoing { + fallbackTimestampLabel.textAlignment = .right fallbackTimestampLabel.pin(.right, to: .left, of: menuView, withInset: -Values.mediumSpacing) + fallbackTimestampLabel.pin(.left, to: .left, of: view, withInset: Values.mediumSpacing) } else { + fallbackTimestampLabel.textAlignment = .left fallbackTimestampLabel.pin(.left, to: .right, of: menuView, withInset: Values.mediumSpacing) + fallbackTimestampLabel.pin(.right, to: .right, of: view, withInset: -Values.mediumSpacing) } // Constrains