reformat code
This commit is contained in:
parent
e3c7e8687a
commit
dcb8b133cc
1 changed files with 2 additions and 12 deletions
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue