New Conversation v2 - Fix find by username/phone options disappearing after rotation.

This commit is contained in:
jeffrey-signal
2025-10-09 14:01:40 -04:00
committed by Cody Henthorne
parent eea89d3b62
commit b49074a786
14 changed files with 175 additions and 135 deletions

View File

@@ -16,6 +16,7 @@ import org.thoughtcrime.securesms.components.ContactFilterView
import org.thoughtcrime.securesms.contacts.ContactSelectionDisplayMode
import org.thoughtcrime.securesms.contacts.SelectedContact
import org.thoughtcrime.securesms.contacts.paged.ChatType
import org.thoughtcrime.securesms.contacts.selection.ContactSelectionArguments
import org.thoughtcrime.securesms.groups.SelectionLimits
import org.thoughtcrime.securesms.recipients.RecipientId
import org.thoughtcrime.securesms.util.ViewUtil
@@ -41,19 +42,18 @@ class ChooseChatsFragment : LoggingFragment(), ContactSelectionListFragment.OnCo
}
childFragmentManager.addFragmentOnAttachListener { _, fragment ->
fragment.arguments = Bundle().apply {
putInt(ContactSelectionListFragment.DISPLAY_MODE, getDefaultDisplayMode())
putBoolean(ContactSelectionListFragment.REFRESHABLE, false)
putBoolean(ContactSelectionListFragment.RECENTS, true)
putParcelable(ContactSelectionListFragment.SELECTION_LIMITS, SelectionLimits.NO_LIMITS)
putParcelableArrayList(ContactSelectionListFragment.CURRENT_SELECTION, ArrayList<RecipientId>(currentSelection))
putBoolean(ContactSelectionListFragment.INCLUDE_CHAT_TYPES, includeChatsMode)
putBoolean(ContactSelectionListFragment.HIDE_COUNT, true)
putBoolean(ContactSelectionListFragment.DISPLAY_CHIPS, true)
putBoolean(ContactSelectionListFragment.CAN_SELECT_SELF, true)
putBoolean(ContactSelectionListFragment.RV_CLIP, false)
putInt(ContactSelectionListFragment.RV_PADDING_BOTTOM, ViewUtil.dpToPx(60))
}
fragment.arguments = ContactSelectionArguments(
displayMode = getDefaultDisplayMode(),
isRefreshable = false,
includeRecents = true,
selectionLimits = SelectionLimits.NO_LIMITS,
currentSelection = currentSelection,
includeChatTypes = includeChatsMode,
displayChips = true,
canSelectSelf = true,
recyclerChildClipping = false,
recyclerPadBottom = ViewUtil.dpToPx(60)
).toArgumentBundle()
}
return inflater.inflate(R.layout.choose_chats_fragment, container, false)

View File

@@ -16,6 +16,7 @@ import org.thoughtcrime.securesms.R
import org.thoughtcrime.securesms.components.ContactFilterView
import org.thoughtcrime.securesms.contacts.ContactSelectionDisplayMode
import org.thoughtcrime.securesms.contacts.paged.ChatType
import org.thoughtcrime.securesms.contacts.selection.ContactSelectionArguments
import org.thoughtcrime.securesms.groups.SelectionLimits
import org.thoughtcrime.securesms.recipients.RecipientId
import org.thoughtcrime.securesms.util.ViewUtil
@@ -46,18 +47,17 @@ class SelectRecipientsFragment : LoggingFragment(), ContactSelectionListFragment
}
childFragmentManager.addFragmentOnAttachListener { _, fragment ->
fragment.arguments = Bundle().apply {
putInt(ContactSelectionListFragment.DISPLAY_MODE, getDefaultDisplayMode())
putBoolean(ContactSelectionListFragment.REFRESHABLE, false)
putBoolean(ContactSelectionListFragment.RECENTS, true)
putParcelable(ContactSelectionListFragment.SELECTION_LIMITS, SelectionLimits.NO_LIMITS)
putParcelableArrayList(ContactSelectionListFragment.CURRENT_SELECTION, selectionList)
putBoolean(ContactSelectionListFragment.HIDE_COUNT, true)
putBoolean(ContactSelectionListFragment.DISPLAY_CHIPS, true)
putBoolean(ContactSelectionListFragment.CAN_SELECT_SELF, false)
putBoolean(ContactSelectionListFragment.RV_CLIP, false)
putInt(ContactSelectionListFragment.RV_PADDING_BOTTOM, ViewUtil.dpToPx(60))
}
fragment.arguments = ContactSelectionArguments(
displayMode = getDefaultDisplayMode(),
isRefreshable = false,
includeRecents = true,
selectionLimits = SelectionLimits.NO_LIMITS,
currentSelection = selectionList.toSet(),
displayChips = true,
canSelectSelf = false,
recyclerChildClipping = false,
recyclerPadBottom = ViewUtil.dpToPx(60)
).toArgumentBundle()
}
return inflater.inflate(R.layout.fragment_select_recipients_fragment, container, false)