show the contacts nickname on View screen too

This commit is contained in:
tibbi 2022-01-03 19:52:06 +01:00
parent c1231b8aed
commit 42b84ea85b
1 changed files with 5 additions and 1 deletions

View File

@ -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())