From 02498ee9a0ca7a88cc61a46ea5ecda4cfed0d90e Mon Sep 17 00:00:00 2001 From: James Downs Date: Sun, 14 Jan 2018 12:13:22 -0500 Subject: [PATCH] Added a check for showing correspondent name to RecipientSelectView --- .../src/main/java/com/fsck/k9/view/RecipientSelectView.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/k9mail/src/main/java/com/fsck/k9/view/RecipientSelectView.java b/k9mail/src/main/java/com/fsck/k9/view/RecipientSelectView.java index 3d5540c9f..ac574fb2f 100644 --- a/k9mail/src/main/java/com/fsck/k9/view/RecipientSelectView.java +++ b/k9mail/src/main/java/com/fsck/k9/view/RecipientSelectView.java @@ -32,6 +32,7 @@ import android.widget.ListPopupWindow; import android.widget.ListView; import android.widget.TextView; +import com.fsck.k9.K9; import com.fsck.k9.R; import com.fsck.k9.activity.AlternateRecipientAdapter; import com.fsck.k9.activity.AlternateRecipientAdapter.AlternateRecipientListener; @@ -605,7 +606,8 @@ public class RecipientSelectView extends TokenCompleteTextView implem } public String getDisplayNameOrAddress() { - String displayName = getDisplayName(); + final String displayName = K9.showCorrespondentNames() ? getDisplayName() : null; + if (displayName != null) { return displayName; }