Show name instead of phone number

... in dialog title
This commit is contained in:
Ivan K
2022-03-29 23:28:59 +03:00
parent 358acde55f
commit 8a2707e117
2 changed files with 1 additions and 11 deletions

View File

@@ -13632,12 +13632,6 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
} else if (currentUser != null) {
if (currentUser.self) {
avatarContainer.setTitle(LocaleController.getString("SavedMessages", R.string.SavedMessages));
} else if (!MessagesController.isSupportUser(currentUser) && getContactsController().contactsDict.get(currentUser.id) == null && (getContactsController().contactsDict.size() != 0 || !getContactsController().isLoadingContacts())) {
if (!TextUtils.isEmpty(currentUser.phone)) {
avatarContainer.setTitle(PhoneFormat.getInstance().format("+" + currentUser.phone));
} else {
avatarContainer.setTitle(UserObject.getUserName(currentUser), currentUser.scam, currentUser.fake);
}
} else {
avatarContainer.setTitle(UserObject.getUserName(currentUser), currentUser.scam, currentUser.fake);
}

View File

@@ -6025,11 +6025,7 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter.
if (nameTextView[a] == null) {
continue;
}
if (a == 0 && user.id != getUserConfig().getClientUserId() && user.id / 1000 != 777 && user.id / 1000 != 333 && user.phone != null && user.phone.length() != 0 && getContactsController().contactsDict.get(user.id) == null &&
(getContactsController().contactsDict.size() != 0 || !getContactsController().isLoadingContacts())) {
String phoneString = PhoneFormat.getInstance().format("+" + user.phone);
nameTextView[a].setText(phoneString);
} else {
if (!nameTextView[a].getText().equals(newString)) {
nameTextView[a].setText(newString);
}
if (a == 0 && onlineTextOverride != null) {