From 42b84ea85bca36793e87a3b9ec29510f62876313 Mon Sep 17 00:00:00 2001 From: tibbi Date: Mon, 3 Jan 2022 19:52:06 +0100 Subject: [PATCH] show the contacts nickname on View screen too --- .../contacts/pro/activities/ViewContactActivity.kt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/activities/ViewContactActivity.kt b/app/src/main/kotlin/com/simplemobiletools/contacts/pro/activities/ViewContactActivity.kt index 7627e303..c6044f06 100644 --- a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/activities/ViewContactActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/contacts/pro/activities/ViewContactActivity.kt @@ -291,7 +291,11 @@ class ViewContactActivity : ContactActivity() { } private fun setupNames() { - val displayName = contact!!.getNameToDisplay() + var displayName = contact!!.getNameToDisplay() + if (contact!!.nickname.isNotEmpty()) { + displayName += " (${contact!!.nickname})" + } + contact_name.text = displayName contact_name.copyOnLongClick(displayName) contact_name.beVisibleIf(displayName.isNotEmpty() && !contact!!.isABusinessContact())