Fix crash when selecting a group to add a recipient.

This commit is contained in:
jeffrey-signal
2026-02-17 11:38:58 -05:00
committed by Alex Hart
parent 2c4d3b3ee4
commit b81c1eb65c
7 changed files with 21 additions and 7 deletions

View File

@@ -123,16 +123,17 @@ class MultiselectForwardFragment :
contactSearchRecycler = view.findViewById(R.id.contact_selection_list)
contactSearchMediator = ContactSearchMediator(
this,
emptySet(),
RemoteConfig.shareSelectionLimit,
ContactSearchAdapter.DisplayOptions(
fragment = this,
fixedContacts = emptySet(),
selectionLimits = RemoteConfig.shareSelectionLimit,
isMultiSelect = !args.selectSingleRecipient,
displayOptions = ContactSearchAdapter.DisplayOptions(
displayCheckBox = !args.selectSingleRecipient,
displaySecondaryInformation = ContactSearchAdapter.DisplaySecondaryInformation.NEVER,
displayStoryRing = true
),
this::getConfiguration,
object : ContactSearchMediator.SimpleCallbacks() {
mapStateToConfiguration = this::getConfiguration,
callbacks = object : ContactSearchMediator.SimpleCallbacks() {
override fun onBeforeContactsSelected(view: View?, contactSearchKeys: Set<ContactSearchKey>): Set<ContactSearchKey> {
val filtered: Set<ContactSearchKey> = filterContacts(view, contactSearchKeys)
Log.d(TAG, "onBeforeContactsSelected() Attempting to select: ${contactSearchKeys.map { it.toString() }}, Filtered selection: ${filtered.map { it.toString() } }")