From 920cb6d882300095b10e6cd64130f6a51e4fddca Mon Sep 17 00:00:00 2001 From: tibbi Date: Tue, 17 Jul 2018 00:09:39 +0200 Subject: [PATCH] shorten some contact name comparison code --- .../kotlin/com/simplemobiletools/contacts/models/Contact.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/contacts/models/Contact.kt b/app/src/main/kotlin/com/simplemobiletools/contacts/models/Contact.kt index 85b448fd..b35c5130 100644 --- a/app/src/main/kotlin/com/simplemobiletools/contacts/models/Contact.kt +++ b/app/src/main/kotlin/com/simplemobiletools/contacts/models/Contact.kt @@ -45,9 +45,9 @@ data class Contact(val id: Int, var prefix: String, var firstName: String, var m -1 } else { if (firstString.toLowerCase() == secondString.toLowerCase()) { - getFullName().compareTo(other.getFullName()) + getFullName().compareTo(other.getFullName(), true) } else { - firstString.toLowerCase().compareTo(secondString.toLowerCase()) + firstString.compareTo(secondString, true) } } }