Skip to content

Commit

Permalink
Remove mutable parameter.
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinBoulongne committed Jun 4, 2024
1 parent de8f8e1 commit dd4a73e
Showing 1 changed file with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ class ContactAdapter(
}

fun searchContacts(text: CharSequence) {

fun performFiltering(constraint: CharSequence): MutableList<MatchedContact> {
val searchTerm = constraint.standardize()

Expand All @@ -126,13 +127,9 @@ class ContactAdapter(
return finalUserList
}

fun publishResults(results: MutableList<MatchedContact>) {
matchedContacts = results
notifyDataSetChanged()
}

searchQuery = text.toString()
publishResults(performFiltering(text))
matchedContacts = performFiltering(text)
notifyDataSetChanged()
}

fun removeUsedEmail(email: String): Boolean {
Expand Down

0 comments on commit dd4a73e

Please sign in to comment.