From 3e30ceb0321ef01c3f70707311335e971ad58552 Mon Sep 17 00:00:00 2001 From: Ryan Zhao Date: Mon, 12 Sep 2022 10:00:03 +1000 Subject: [PATCH] feat: long press to show copy on current user's public key label --- Session/Home/New Conversation/NewDMVC.swift | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Session/Home/New Conversation/NewDMVC.swift b/Session/Home/New Conversation/NewDMVC.swift index ffe7b9cff..ab32a59f9 100644 --- a/Session/Home/New Conversation/NewDMVC.swift +++ b/Session/Home/New Conversation/NewDMVC.swift @@ -212,8 +212,8 @@ private final class EnterPublicKeyVC : UIViewController { return result }() - private lazy var userPublicKeyLabel: UILabel = { - let result = UILabel() + private lazy var userPublicKeyLabel: SRCopyableLabel = { + let result = SRCopyableLabel() result.textColor = Colors.text result.font = Fonts.spaceMono(ofSize: Values.mediumFontSize) result.numberOfLines = 0 @@ -272,7 +272,11 @@ private final class EnterPublicKeyVC : UIViewController { // Remove background color view.backgroundColor = .clear // User session id container - let userPublicKeyContainer = UIView(wrapping: userPublicKeyLabel, withInsets: .zero, shouldAdaptForIPadWithWidth: Values.iPadUserSessionIdContainerWidth) + let userPublicKeyContainer = UIView( + wrapping: userPublicKeyLabel, + withInsets: .zero, + shouldAdaptForIPadWithWidth: Values.iPadUserSessionIdContainerWidth + ) // Explanation label let explanationLabel = UILabel() explanationLabel.textColor = Colors.text.withAlphaComponent(Values.mediumOpacity)