Implement badge gifting behind feature flag.

This commit is contained in:
Alex Hart
2022-05-02 14:29:42 -03:00
committed by Greyson Parrelli
parent 5d16d1cd23
commit a4a4665aaa
164 changed files with 4999 additions and 486 deletions

View File

@@ -42,7 +42,7 @@ sealed class MediaSelectionDestination {
companion object {
fun fromParcel(parcelables: List<ContactSearchKey.ParcelableRecipientSearchKey>): MultipleRecipients {
return MultipleRecipients(parcelables.map { it.asContactSearchKey() }.filterIsInstance(ContactSearchKey.RecipientSearchKey::class.java))
return MultipleRecipients(parcelables.map { it.asRecipientSearchKey() }.filterIsInstance(ContactSearchKey.RecipientSearchKey::class.java))
}
}

View File

@@ -244,7 +244,8 @@ class MediaSelectionRepository(context: Context) {
emptyList(),
mentions,
mutableSetOf(),
mutableSetOf()
mutableSetOf(),
null
)
if (isStory && preUploadResults.size > 1) {

View File

@@ -140,7 +140,7 @@ class MediaReviewFragment : Fragment(R.layout.v2_media_review_fragment) {
setFragmentResultListener(MultiselectForwardFragment.RESULT_KEY) { _, bundle ->
val parcelizedKeys: List<ContactSearchKey.ParcelableRecipientSearchKey> = bundle.getParcelableArrayList(MultiselectForwardFragment.RESULT_SELECTION)!!
val contactSearchKeys = parcelizedKeys.map { it.asContactSearchKey() }
val contactSearchKeys = parcelizedKeys.map { it.asRecipientSearchKey() }
performSend(contactSearchKeys)
}

View File

@@ -64,7 +64,8 @@ class ChooseGroupStoryBottomSheet : FixedRoundedCornerBottomSheetDialogFragment(
mediator = ContactSearchMediator(
this,
contactRecycler,
FeatureFlags.shareSelectionLimit()
FeatureFlags.shareSelectionLimit(),
true
) { state ->
ContactSearchConfiguration.build {
query = state.query

View File

@@ -122,7 +122,7 @@ class TextStoryPostSendFragment : Fragment(R.layout.stories_send_text_post_fragm
}
val contactsRecyclerView: RecyclerView = view.findViewById(R.id.contacts_container)
contactSearchMediator = ContactSearchMediator(this, contactsRecyclerView, FeatureFlags.shareSelectionLimit()) { contactSearchState ->
contactSearchMediator = ContactSearchMediator(this, contactsRecyclerView, FeatureFlags.shareSelectionLimit(), true) { contactSearchState ->
ContactSearchConfiguration.build {
query = contactSearchState.query

View File

@@ -75,7 +75,8 @@ class TextStoryPostSendRepository {
listOfNotNull(linkPreview),
emptyList(),
mutableSetOf(),
mutableSetOf()
mutableSetOf(),
null
)
messages.add(OutgoingSecureMediaMessage(message))