From 6b09188dafc366872542db1c63dfa874e8b24d6a Mon Sep 17 00:00:00 2001 From: NekoInverter <42698724+NekoInverter@users.noreply.github.com> Date: Tue, 10 Mar 2020 12:05:35 +0800 Subject: [PATCH] Improve phone hidden --- .../main/java/org/telegram/ui/Cells/DrawerProfileCell.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Cells/DrawerProfileCell.java b/TMessagesProj/src/main/java/org/telegram/ui/Cells/DrawerProfileCell.java index 13107bde1..a48bcfbed 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/Cells/DrawerProfileCell.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/Cells/DrawerProfileCell.java @@ -263,6 +263,10 @@ public class DrawerProfileCell extends FrameLayout { nameTextView.setText(UserObject.getUserName(user)); if (!NekoConfig.hidePhone) { phoneTextView.setText(PhoneFormat.getInstance().format("+" + user.phone)); + } else if (!TextUtils.isEmpty(user.username)) { + phoneTextView.setText("@" + user.username); + } else { + phoneTextView.setText(LocaleController.getString("MobileHidden",R.string.MobileHidden)); } AvatarDrawable avatarDrawable = new AvatarDrawable(user); avatarDrawable.setColor(Theme.getColor(Theme.key_avatar_backgroundInProfileBlue));