ContactsAdapter mutable arrayList changed to list

This commit is contained in:
merkost 2023-07-22 12:03:57 +10:00
parent 96dfd3f230
commit 7f7e179d4b

View File

@ -149,9 +149,9 @@ class ContactsAdapter(
override fun getItemCount() = contacts.size
fun updateItems(newItems: ArrayList<Contact>, highlightText: String = "") {
fun updateItems(newItems: List<Contact>, highlightText: String = "") {
if (newItems.hashCode() != contacts.hashCode()) {
contacts = newItems.clone() as ArrayList<Contact>
contacts = ArrayList(newItems)
textToHighlight = highlightText
notifyDataSetChanged()
finishActMode()