Skip to content

Commit a1a2573

Browse files
committed
fix #28, make the contacts beginning with the search string appear first
1 parent 2b636f7 commit a1a2573

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

app/src/main/kotlin/com/simplemobiletools/contacts/fragments/MyViewPagerFragment.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,11 @@ abstract class MyViewPagerFragment(context: Context, attributeSet: AttributeSet)
163163
it.phoneNumbers.any { it.value.contains(text, true) } ||
164164
it.emails.any { it.value.contains(text, true) }
165165
} as ArrayList
166+
167+
Contact.sorting = config.sorting
168+
filtered.sort()
169+
filtered.sortBy { !it.getFullName(startNameWithSurname).startsWith(text, true) }
170+
166171
updateItems(filtered)
167172
}
168173
}

0 commit comments

Comments
 (0)