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

@@ -66,7 +66,7 @@ public final class MultiShareArgs implements Parcelable {
List<ContactSearchKey.ParcelableRecipientSearchKey> parcelableRecipientSearchKeys = in.createTypedArrayList(ContactSearchKey.ParcelableRecipientSearchKey.CREATOR);
contactSearchKeys = parcelableRecipientSearchKeys.stream()
.map(ContactSearchKey.ParcelableRecipientSearchKey::asContactSearchKey)
.map(ContactSearchKey.ParcelableRecipientSearchKey::asRecipientSearchKey)
.collect(Collectors.toSet());
media = in.createTypedArrayList(Media.CREATOR);
draftText = in.readString();

View File

@@ -227,7 +227,8 @@ public final class MultiShareSender {
Collections.emptyList(),
multiShareArgs.getLinkPreview() != null ? Collections.singletonList(multiShareArgs.getLinkPreview())
: Collections.emptyList(),
Collections.emptyList());
Collections.emptyList(),
null);
outgoingMessages.add(outgoingMediaMessage);
} else if (canSendAsTextStory) {
@@ -256,7 +257,8 @@ public final class MultiShareSender {
null,
Collections.emptyList(),
Collections.emptyList(),
validatedMentions);
validatedMentions,
null);
outgoingMessages.add(outgoingMediaMessage);
}
@@ -277,7 +279,8 @@ public final class MultiShareSender {
Collections.emptyList(),
multiShareArgs.getLinkPreview() != null ? Collections.singletonList(multiShareArgs.getLinkPreview())
: Collections.emptyList(),
validatedMentions);
validatedMentions,
null);
outgoingMessages.add(outgoingMediaMessage);
}
@@ -344,7 +347,8 @@ public final class MultiShareSender {
: Collections.emptyList(),
Collections.emptyList(),
Collections.emptySet(),
Collections.emptySet());
Collections.emptySet(),
null);
}
private static @NonNull String getBodyForTextStory(@Nullable String draftText, @Nullable LinkPreview linkPreview) {

View File

@@ -109,7 +109,7 @@ class ShareActivity : PassphraseRequiredActivity(), MultiselectForwardFragment.C
}
val parcelizedKeys: List<ContactSearchKey.ParcelableRecipientSearchKey> = bundle.getParcelableArrayList(MultiselectForwardFragment.RESULT_SELECTION)!!
val contactSearchKeys = parcelizedKeys.map { it.asContactSearchKey() }
val contactSearchKeys = parcelizedKeys.map { it.asRecipientSearchKey() }
viewModel.onContactSelectionConfirmed(contactSearchKeys)
}