reformat code

This commit is contained in:
Pavel Poley 2022-05-14 16:52:00 +03:00
parent e3c7e8687a
commit dcb8b133cc

View file

@ -19,12 +19,8 @@ data class SimpleContact(
if (sorting == -1) return compareByFullName(other)
var result = when {
sorting and SORT_BY_FULL_NAME != 0 -> {
compareByFullName(other)
}
else -> {
compareUsingIds(other)
}
sorting and SORT_BY_FULL_NAME != 0 -> compareByFullName(other)
else -> rawId.compareTo(other.rawId)
}
if (sorting and SORT_DESCENDING != 0) {
@ -53,12 +49,6 @@ data class SimpleContact(
}
}
private fun compareUsingIds(other: SimpleContact): Int {
val firstId = rawId
val secondId = other.rawId
return firstId.compareTo(secondId)
}
fun doesContainPhoneNumber(text: String): Boolean {
return if (text.isNotEmpty()) {
val normalizedText = text.normalizePhoneNumber()