Refactor ContactSelectionListFragment to use ContactSearch infrastructure.

This commit is contained in:
Alex Hart
2023-02-02 14:02:14 -04:00
committed by Nicholas Tinsley
parent 0f6bc0471c
commit 7fbfc09a89
39 changed files with 1088 additions and 1249 deletions

View File

@@ -120,11 +120,17 @@ class MultiselectForwardFragment :
contactSearchRecycler = view.findViewById(R.id.contact_selection_list)
contactSearchMediator = ContactSearchMediator(
this,
emptySet(),
FeatureFlags.shareSelectionLimit(),
!args.selectSingleRecipient,
ContactSearchAdapter.DisplaySmsTag.DEFAULT,
ContactSearchAdapter.DisplayPhoneNumber.NEVER,
this::getConfiguration,
this::filterContacts
object : ContactSearchMediator.SimpleCallbacks() {
override fun onBeforeContactsSelected(view: View?, contactSearchKeys: Set<ContactSearchKey>): Set<ContactSearchKey> {
return filterContacts(view, contactSearchKeys)
}
}
)
contactSearchRecycler.adapter = contactSearchMediator.adapter