use of org.thoughtcrime.securesms.mms.SlideDeck in project Signal-Android by signalapp.
the class ConversationParentFragment method sendVoiceNote.
private void sendVoiceNote(@NonNull Uri uri, long size) {
boolean forceSms = sendButton.isManualSelection() && sendButton.getSelectedTransport().isSms();
boolean initiating = threadId == -1;
int subscriptionId = sendButton.getSelectedTransport().getSimSubscriptionId().or(-1);
long expiresIn = TimeUnit.SECONDS.toMillis(recipient.get().getExpiresInSeconds());
AudioSlide audioSlide = new AudioSlide(requireContext(), uri, size, MediaUtil.AUDIO_AAC, true);
SlideDeck slideDeck = new SlideDeck();
slideDeck.addSlide(audioSlide);
ListenableFuture<Void> sendResult = sendMediaMessage(recipient.getId(), forceSms, "", slideDeck, inputPanel.getQuote().orNull(), Collections.emptyList(), Collections.emptyList(), composeText.getMentions(), expiresIn, false, subscriptionId, initiating, true, null);
sendResult.addListener(new AssertedSuccessListener<Void>() {
@Override
public void onSuccess(Void nothing) {
draftViewModel.deleteBlob(uri);
}
});
}
Aggregations