mirror of
https://github.com/SimpleMobileTools/Simple-SMS-Messenger.git
synced 2025-02-18 04:30:55 +01:00
try filtering out duplicate contacts at the autocomplete suggestions
This commit is contained in:
parent
dc806c97d0
commit
1b3c6d9dac
@ -52,6 +52,11 @@ class NewMessageActivity : SimpleActivity() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
contacts = contacts.distinctBy {
|
||||||
|
val startIndex = Math.max(0, it.phoneNumber.length - 9)
|
||||||
|
it.phoneNumber.substring(startIndex)
|
||||||
|
}.toMutableList() as ArrayList<Contact>
|
||||||
|
|
||||||
val adapter = AutoCompleteTextViewAdapter(this, contacts)
|
val adapter = AutoCompleteTextViewAdapter(this, contacts)
|
||||||
new_message_to.setAdapter(adapter)
|
new_message_to.setAdapter(adapter)
|
||||||
new_message_to.imeOptions = EditorInfo.IME_ACTION_NEXT
|
new_message_to.imeOptions = EditorInfo.IME_ACTION_NEXT
|
||||||
|
Loading…
x
Reference in New Issue
Block a user