mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-27 12:05:22 +00:00
Fix for contrived NPE on invalid recipient during conversation compose.
This commit is contained in:
parent
ea98fe2d4f
commit
d2a78ea84c
@ -81,6 +81,7 @@
|
||||
<string name="ConversationActivity_group_conversation">Group Conversation</string>
|
||||
<string name="ConversationActivity_d_recipients_in_group">%d recipients in group</string>
|
||||
<string name="ConversationActivity_saving_draft">Saving draft...</string>
|
||||
<string name="ConversationActivity_invalid_recipient">Invalid recipient!</string>
|
||||
|
||||
<!-- ConversationFragment -->
|
||||
<string name="ConversationFragment_message_details">Message details</string>
|
||||
|
@ -300,6 +300,12 @@ public class ConversationActivity extends PassphraseRequiredSherlockFragmentActi
|
||||
}
|
||||
|
||||
private void handleStartSecureSession() {
|
||||
if (getRecipients() == null) {
|
||||
Toast.makeText(this, getString(R.string.ConversationActivity_invalid_recipient),
|
||||
Toast.LENGTH_LONG).show();
|
||||
return;
|
||||
}
|
||||
|
||||
final Recipient recipient = getRecipients().getPrimaryRecipient();
|
||||
String recipientName = (recipient.getName() == null ? recipient.getNumber() : recipient.getName());
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(this);
|
||||
|
Loading…
Reference in New Issue
Block a user