mirror of
https://github.com/oxen-io/session-android.git
synced 2025-02-17 13:18:26 +00:00
parent
57cb68849e
commit
b40f0ffeb0
@ -173,6 +173,7 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
|
|||||||
private static final int PICK_CONTACT_INFO = 4;
|
private static final int PICK_CONTACT_INFO = 4;
|
||||||
private static final int GROUP_EDIT = 5;
|
private static final int GROUP_EDIT = 5;
|
||||||
private static final int TAKE_PHOTO = 6;
|
private static final int TAKE_PHOTO = 6;
|
||||||
|
private static final int ADD_CONTACT = 7;
|
||||||
|
|
||||||
private MasterSecret masterSecret;
|
private MasterSecret masterSecret;
|
||||||
protected ComposeText composeText;
|
protected ComposeText composeText;
|
||||||
@ -343,6 +344,11 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
|
|||||||
setMedia(attachmentManager.getCaptureUri(), MediaType.IMAGE);
|
setMedia(attachmentManager.getCaptureUri(), MediaType.IMAGE);
|
||||||
}
|
}
|
||||||
break;
|
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);
|
final Intent intent = new Intent(Intent.ACTION_INSERT_OR_EDIT);
|
||||||
intent.putExtra(ContactsContract.Intents.Insert.PHONE, recipients.getPrimaryRecipient().getNumber());
|
intent.putExtra(ContactsContract.Intents.Insert.PHONE, recipients.getPrimaryRecipient().getNumber());
|
||||||
intent.setType(ContactsContract.Contacts.CONTENT_ITEM_TYPE);
|
intent.setType(ContactsContract.Contacts.CONTENT_ITEM_TYPE);
|
||||||
startActivity(intent);
|
startActivityForResult(intent, ADD_CONTACT);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void handleAddAttachment() {
|
private void handleAddAttachment() {
|
||||||
|
@ -152,6 +152,10 @@ public class ConversationFragment extends Fragment
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void reloadList() {
|
||||||
|
getLoaderManager().restartLoader(0, null, this);
|
||||||
|
}
|
||||||
|
|
||||||
private void initializeResources() {
|
private void initializeResources() {
|
||||||
this.recipients = RecipientFactory.getRecipientsForIds(getActivity(), getActivity().getIntent().getLongArrayExtra("recipients"), true);
|
this.recipients = RecipientFactory.getRecipientsForIds(getActivity(), getActivity().getIntent().getLongArrayExtra("recipients"), true);
|
||||||
this.threadId = this.getActivity().getIntent().getLongExtra("thread_id", -1);
|
this.threadId = this.getActivity().getIntent().getLongExtra("thread_id", -1);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user