From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: alina sireneva <alina@tei.su>
Date: Fri, 17 Jul 2026 20:28:48 +0400
Subject: copy name by long-tapping it in the profile

---
 .../src/main/java/org/telegram/ui/ProfileActivity.java   | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/TMessagesProj/src/main/java/org/telegram/ui/ProfileActivity.java b/TMessagesProj/src/main/java/org/telegram/ui/ProfileActivity.java
index 0000000..0000000 100644
--- a/TMessagesProj/src/main/java/org/telegram/ui/ProfileActivity.java
+++ b/TMessagesProj/src/main/java/org/telegram/ui/ProfileActivity.java
@@ -5582,6 +5582,15 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter.
             nameTextView[a].setRightDrawableOutside(a == 0);
             avatarContainer2.addView(nameTextView[a], LayoutHelper.createFrame(a == 0 ? initialTitleWidth : LayoutHelper.WRAP_CONTENT, LayoutHelper.WRAP_CONTENT, Gravity.LEFT | Gravity.TOP, 109, -6, (a == 0 ? rightMargin - (hasTitleExpanded ? 10 : 0) : 0), 0));
         }
+        nameTextView[1].setOnLongClickListener(v -> {
+            CharSequence text = nameTextView[1].getText();
+            if (TextUtils.isEmpty(text)) {
+                return false;
+            }
+            AndroidUtilities.addToClipboard(text);
+            BulletinFactory.of(ProfileActivity.this).createCopyBulletin(getString(R.string.TextCopied)).show();
+            return true;
+        });
         for (int a = 0; a < onlineTextView.length; a++) {
             if (a == 1) {
                 onlineTextView[a] = new LinkSpanDrawable.ClickableSmallTextView(context) {
