fix #580, always show middle name after first name
This commit is contained in:
parent
234d144d17
commit
484d9c5abd
|
@ -93,12 +93,9 @@ data class Contact(var id: Int, var prefix: String, var firstName: String, var m
|
|||
}
|
||||
|
||||
fun getNameToDisplay(): String {
|
||||
var firstPart = if (startWithSurname) surname else firstName
|
||||
if (middleName.isNotEmpty()) {
|
||||
firstPart += " $middleName"
|
||||
}
|
||||
|
||||
val lastPart = if (startWithSurname) firstName else surname
|
||||
val firstMiddle = "$firstName $middleName".trim()
|
||||
val firstPart = if (startWithSurname) surname else firstMiddle
|
||||
val lastPart = if (startWithSurname) firstMiddle else surname
|
||||
val suffixComma = if (suffix.isEmpty()) "" else ", $suffix"
|
||||
val fullName = "$prefix $firstPart $lastPart$suffixComma".trim()
|
||||
return if (fullName.isEmpty()) {
|
||||
|
|
|
@ -9,7 +9,7 @@ buildscript {
|
|||
}
|
||||
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:4.0.0'
|
||||
classpath 'com.android.tools.build:gradle:4.0.1'
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||
|
||||
// NOTE: Do not place your application dependencies here; they belong
|
||||
|
|
Loading…
Reference in New Issue