From dae0d30367350b69f295e33729111cb9a636adec Mon Sep 17 00:00:00 2001 From: Alan Evans Date: Thu, 23 May 2019 16:21:09 -0300 Subject: [PATCH] Do not show contact address in subtitle. --- .../conversation/ConversationTitleView.java | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/org/thoughtcrime/securesms/conversation/ConversationTitleView.java b/src/org/thoughtcrime/securesms/conversation/ConversationTitleView.java index 4e88960e5f..2950b97d09 100644 --- a/src/org/thoughtcrime/securesms/conversation/ConversationTitleView.java +++ b/src/org/thoughtcrime/securesms/conversation/ConversationTitleView.java @@ -144,10 +144,14 @@ public class ConversationTitleView extends RelativeLayout { private void setContactRecipientTitle(Recipient recipient) { this.title.setText(recipient.getName()); - if (recipient.getCustomLabel() != null) this.subtitle.setText(recipient.getCustomLabel()); - else this.subtitle.setText(recipient.getAddress().serialize()); - - this.subtitle.setVisibility(View.VISIBLE); - this.subtitleContainer.setVisibility(VISIBLE); + if (TextUtils.isEmpty(recipient.getCustomLabel())) { + this.subtitle.setText(null); + this.subtitle.setVisibility(View.GONE); + this.subtitleContainer.setVisibility(View.GONE); + } else { + this.subtitle.setText(recipient.getCustomLabel()); + this.subtitle.setVisibility(View.VISIBLE); + this.subtitleContainer.setVisibility(View.VISIBLE); + } } }