hide phone number

This commit is contained in:
Riko Sakurauchi 2019-06-20 20:29:59 +08:00
parent 5bc372093d
commit 2299a7a250
No known key found for this signature in database
GPG Key ID: 25AC0345B92902AF

View File

@ -40,6 +40,8 @@ import org.telegram.ui.Components.LayoutHelper;
import org.telegram.ui.ActionBar.Theme; import org.telegram.ui.ActionBar.Theme;
import org.telegram.ui.Components.SnowflakesEffect; import org.telegram.ui.Components.SnowflakesEffect;
import tw.nekomimi.nekogram.NekoConfig;
public class DrawerProfileCell extends FrameLayout { public class DrawerProfileCell extends FrameLayout {
private BackupImageView avatarImageView; private BackupImageView avatarImageView;
@ -198,7 +200,9 @@ public class DrawerProfileCell extends FrameLayout {
accountsShowed = accounts; accountsShowed = accounts;
arrowView.setImageResource(accountsShowed ? R.drawable.collapse_up : R.drawable.collapse_down); arrowView.setImageResource(accountsShowed ? R.drawable.collapse_up : R.drawable.collapse_down);
nameTextView.setText(UserObject.getUserName(user)); nameTextView.setText(UserObject.getUserName(user));
if (!NekoConfig.hidePhone) {
phoneTextView.setText(PhoneFormat.getInstance().format("+" + user.phone)); phoneTextView.setText(PhoneFormat.getInstance().format("+" + user.phone));
}
AvatarDrawable avatarDrawable = new AvatarDrawable(user); AvatarDrawable avatarDrawable = new AvatarDrawable(user);
avatarDrawable.setColor(Theme.getColor(Theme.key_avatar_backgroundInProfileBlue)); avatarDrawable.setColor(Theme.getColor(Theme.key_avatar_backgroundInProfileBlue));
avatarImageView.setImage(ImageLocation.getForUser(user, false), "50_50", avatarDrawable, user); avatarImageView.setImage(ImageLocation.getForUser(user, false), "50_50", avatarDrawable, user);