Skip to content

Commit

Permalink
feat: hide phone number in MyProfile
Browse files Browse the repository at this point in the history
Signed-off-by: Next Alone <[email protected]>
  • Loading branch information
NextAlone committed Dec 28, 2024
1 parent 6b87b45 commit d891f71
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions TMessagesProj/src/main/java/org/telegram/ui/ProfileActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -11762,12 +11762,17 @@ public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) {
String text;
TLRPC.User user = getMessagesController().getUser(userId);
String phoneNumber;
if (user != null && !TextUtils.isEmpty(vcardPhone)) {
text = PhoneFormat.getInstance().format("+" + vcardPhone);
phoneNumber = vcardPhone;
} else if (user != null && !TextUtils.isEmpty(user.phone)) {
text = PhoneFormat.getInstance().format("+" + user.phone);
phoneNumber = user.phone;
if (!Config.hidePhone) {
if (user != null && !TextUtils.isEmpty(vcardPhone)) {
text = PhoneFormat.getInstance().format("+" + vcardPhone);
phoneNumber = vcardPhone;
} else if (user != null && !TextUtils.isEmpty(user.phone)) {
text = PhoneFormat.getInstance().format("+" + user.phone);
phoneNumber = user.phone;
} else {
text = LocaleController.getString(R.string.PhoneHidden);
phoneNumber = null;
}
} else {
text = LocaleController.getString(R.string.PhoneHidden);
phoneNumber = null;
Expand Down

0 comments on commit d891f71

Please sign in to comment.