mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-23 18:30:20 +01:00
Prevent double tap send on camera first flow.
Defensive array list copies where used in builders and Intent#putParcelableArrayListExtra. Spelling.
This commit is contained in:
@@ -569,22 +569,14 @@ public class MediaSendActivity extends PassphraseRequiredActivity implements Med
|
||||
|
||||
@Override
|
||||
public void onCameraContactsSendClicked(@NonNull List<Recipient> recipients) {
|
||||
MediaSendFragment fragment = getMediaSendFragment();
|
||||
|
||||
if (fragment != null) {
|
||||
fragment.pausePlayback();
|
||||
|
||||
SimpleProgressDialog.DismissibleDialog dialog = SimpleProgressDialog.showDelayed(this, 300, 0);
|
||||
viewModel.onSendClicked(buildModelsToTransform(fragment), recipients, composeText.getMentions()).observe(this, result -> {
|
||||
dialog.dismiss();
|
||||
setActivityResultAndFinish(result);
|
||||
});
|
||||
} else {
|
||||
throw new AssertionError("No editor fragment available!");
|
||||
}
|
||||
onSend(recipients);
|
||||
}
|
||||
|
||||
private void onSendClicked() {
|
||||
onSend(Collections.emptyList());
|
||||
}
|
||||
|
||||
private void onSend(@NonNull List<Recipient> recipients) {
|
||||
MediaSendFragment fragment = getMediaSendFragment();
|
||||
|
||||
if (fragment == null) {
|
||||
@@ -600,7 +592,7 @@ public class MediaSendActivity extends PassphraseRequiredActivity implements Med
|
||||
fragment.pausePlayback();
|
||||
|
||||
SimpleProgressDialog.DismissibleDialog dialog = SimpleProgressDialog.showDelayed(this, 300, 0);
|
||||
viewModel.onSendClicked(buildModelsToTransform(fragment), Collections.emptyList(), composeText.getMentions())
|
||||
viewModel.onSendClicked(buildModelsToTransform(fragment), recipients, composeText.getMentions())
|
||||
.observe(this, result -> {
|
||||
dialog.dismiss();
|
||||
setActivityResultAndFinish(result);
|
||||
|
||||
Reference in New Issue
Block a user