mirror of
https://github.com/oxen-io/session-android.git
synced 2023-12-14 02:53:01 +01:00
parent
57cb68849e
commit
b40f0ffeb0
2 changed files with 11 additions and 1 deletions
|
@ -173,6 +173,7 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
|
|||
private static final int PICK_CONTACT_INFO = 4;
|
||||
private static final int GROUP_EDIT = 5;
|
||||
private static final int TAKE_PHOTO = 6;
|
||||
private static final int ADD_CONTACT = 7;
|
||||
|
||||
private MasterSecret masterSecret;
|
||||
protected ComposeText composeText;
|
||||
|
@ -343,6 +344,11 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
|
|||
setMedia(attachmentManager.getCaptureUri(), MediaType.IMAGE);
|
||||
}
|
||||
break;
|
||||
case ADD_CONTACT:
|
||||
recipients = RecipientFactory.getRecipientsForIds(ConversationActivity.this, recipients.getIds(), true);
|
||||
recipients.addListener(this);
|
||||
fragment.reloadList();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -655,7 +661,7 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
|
|||
final Intent intent = new Intent(Intent.ACTION_INSERT_OR_EDIT);
|
||||
intent.putExtra(ContactsContract.Intents.Insert.PHONE, recipients.getPrimaryRecipient().getNumber());
|
||||
intent.setType(ContactsContract.Contacts.CONTENT_ITEM_TYPE);
|
||||
startActivity(intent);
|
||||
startActivityForResult(intent, ADD_CONTACT);
|
||||
}
|
||||
|
||||
private void handleAddAttachment() {
|
||||
|
|
|
@ -152,6 +152,10 @@ public class ConversationFragment extends Fragment
|
|||
}
|
||||
}
|
||||
|
||||
public void reloadList() {
|
||||
getLoaderManager().restartLoader(0, null, this);
|
||||
}
|
||||
|
||||
private void initializeResources() {
|
||||
this.recipients = RecipientFactory.getRecipientsForIds(getActivity(), getActivity().getIntent().getLongArrayExtra("recipients"), true);
|
||||
this.threadId = this.getActivity().getIntent().getLongExtra("thread_id", -1);
|
||||
|
|
Loading…
Reference in a new issue