Show profile name in call screen

Fixes #7020
// FREEBIE
This commit is contained in:
Moxie Marlinspike 2017-10-03 13:29:49 -07:00
parent 04fcb9c531
commit a929bf91f1

View File

@ -27,6 +27,7 @@ import android.support.design.widget.FloatingActionButton;
import android.support.v4.view.ViewCompat;
import android.text.SpannableString;
import android.text.Spanned;
import android.text.TextUtils;
import android.text.method.LinkMovementMethod;
import android.util.AttributeSet;
import android.util.DisplayMetrics;
@ -304,8 +305,13 @@ public class WebRtcCallScreen extends FrameLayout implements RecipientModifiedLi
}.execute();
this.name.setText(recipient.getName());
if (recipient.getName() == null && !TextUtils.isEmpty(recipient.getProfileName())) {
this.phoneNumber.setText(recipient.getAddress().serialize() + " (~" + recipient.getProfileName() + ")");
} else {
this.phoneNumber.setText(recipient.getAddress().serialize());
}
}
private void setCard(Recipient recipient, String status) {
setPersonInfo(recipient);