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.support.v4.view.ViewCompat;
import android.text.SpannableString; import android.text.SpannableString;
import android.text.Spanned; import android.text.Spanned;
import android.text.TextUtils;
import android.text.method.LinkMovementMethod; import android.text.method.LinkMovementMethod;
import android.util.AttributeSet; import android.util.AttributeSet;
import android.util.DisplayMetrics; import android.util.DisplayMetrics;
@ -304,8 +305,13 @@ public class WebRtcCallScreen extends FrameLayout implements RecipientModifiedLi
}.execute(); }.execute();
this.name.setText(recipient.getName()); 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()); this.phoneNumber.setText(recipient.getAddress().serialize());
} }
}
private void setCard(Recipient recipient, String status) { private void setCard(Recipient recipient, String status) {
setPersonInfo(recipient); setPersonInfo(recipient);