feat: hideProfIlePhone

Co-authored-by: =?UTF-8?q?=E2=80=ADhuajijam?= <strhuaji@gmail.com>
This commit is contained in:
xtaodada 2023-08-12 18:04:46 +08:00
parent 06cb8af78b
commit fa1a26579c
Signed by: xtaodada
GPG Key ID: 4CBB3F4FA8C85659

View File

@ -9795,11 +9795,13 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter.
}
} else if (position == numberRow) {
TLRPC.User user = UserConfig.getInstance(currentAccount).getCurrentUser();
String value;
String value = LocaleController.getString("NumberUnknown", R.string.NumberUnknown);
if (!NekoConfig.hidePhone.Bool()) {
if (user != null && user.phone != null && user.phone.length() != 0) {
value = PhoneFormat.getInstance().format("+" + user.phone);
} else {
value = LocaleController.getString("NumberUnknown", R.string.NumberUnknown);
}
} else if (!TextUtils.isEmpty(user.username)) {
value = "@" + user.username;
}
detailCell.setTextAndValue(value, LocaleController.getString("TapToChangePhone", R.string.TapToChangePhone), true);
detailCell.setContentDescriptionValueFirst(false);