Search in sources :

Example 1 with UnverifiedSendDialog

use of org.thoughtcrime.securesms.components.identity.UnverifiedSendDialog in project Signal-Android by signalapp.

the class ConversationActivity method handleUnverifiedRecipients.

private void handleUnverifiedRecipients() {
    List<Recipient> unverifiedRecipients = identityRecords.getUnverifiedRecipients(this);
    List<IdentityRecord> unverifiedRecords = identityRecords.getUnverifiedRecords();
    String message = IdentityUtil.getUnverifiedSendDialogDescription(this, unverifiedRecipients);
    if (message == null)
        return;
    // noinspection CodeBlock2Expr
    new UnverifiedSendDialog(this, message, unverifiedRecords, () -> {
        initializeIdentityRecords().addListener(new ListenableFuture.Listener<Boolean>() {

            @Override
            public void onSuccess(Boolean result) {
                sendMessage();
            }

            @Override
            public void onFailure(ExecutionException e) {
                throw new AssertionError(e);
            }
        });
    }).show();
}
Also used : AttachmentDrawerListener(org.thoughtcrime.securesms.components.camera.QuickAttachmentDrawer.AttachmentDrawerListener) OnFocusChangeListener(android.view.View.OnFocusChangeListener) AssertedSuccessListener(org.thoughtcrime.securesms.util.concurrent.AssertedSuccessListener) OnKeyboardShownListener(org.thoughtcrime.securesms.components.KeyboardAwareLinearLayout.OnKeyboardShownListener) OnKeyListener(android.view.View.OnKeyListener) RecipientModifiedListener(org.thoughtcrime.securesms.recipients.RecipientModifiedListener) OnClickListener(android.view.View.OnClickListener) IdentityRecord(org.thoughtcrime.securesms.database.IdentityDatabase.IdentityRecord) Recipient(org.thoughtcrime.securesms.recipients.Recipient) ByteString(com.google.protobuf.ByteString) ExecutionException(java.util.concurrent.ExecutionException) UnverifiedSendDialog(org.thoughtcrime.securesms.components.identity.UnverifiedSendDialog)

Aggregations

OnClickListener (android.view.View.OnClickListener)1 OnFocusChangeListener (android.view.View.OnFocusChangeListener)1 OnKeyListener (android.view.View.OnKeyListener)1 ByteString (com.google.protobuf.ByteString)1 ExecutionException (java.util.concurrent.ExecutionException)1 OnKeyboardShownListener (org.thoughtcrime.securesms.components.KeyboardAwareLinearLayout.OnKeyboardShownListener)1 AttachmentDrawerListener (org.thoughtcrime.securesms.components.camera.QuickAttachmentDrawer.AttachmentDrawerListener)1 UnverifiedSendDialog (org.thoughtcrime.securesms.components.identity.UnverifiedSendDialog)1 IdentityRecord (org.thoughtcrime.securesms.database.IdentityDatabase.IdentityRecord)1 Recipient (org.thoughtcrime.securesms.recipients.Recipient)1 RecipientModifiedListener (org.thoughtcrime.securesms.recipients.RecipientModifiedListener)1 AssertedSuccessListener (org.thoughtcrime.securesms.util.concurrent.AssertedSuccessListener)1