trim the user email before displaying, just to be sure

This commit is contained in:
tibbi 2018-10-27 17:12:55 +02:00
parent f6347db55d
commit b3bd0f182b
1 changed files with 1 additions and 1 deletions

View File

@ -87,7 +87,7 @@ data class Contact(val id: Int, var prefix: String, var firstName: String, var m
val fullName = "$prefix $firstPart $lastPart$suffixComma".trim() val fullName = "$prefix $firstPart $lastPart$suffixComma".trim()
return if (fullName.isEmpty()) { return if (fullName.isEmpty()) {
if (organization.isEmpty()) { if (organization.isEmpty()) {
emails.firstOrNull()?.value ?: "" emails.firstOrNull()?.value?.trim() ?: ""
} else { } else {
var fullOrganization = if (organization.jobPosition.isEmpty()) "" else "${organization.jobPosition}, " var fullOrganization = if (organization.jobPosition.isEmpty()) "" else "${organization.jobPosition}, "
fullOrganization += organization.company fullOrganization += organization.company