mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-21 00:59:49 +01:00
Convert vCard attachments to Shared Contacts.
When you share a vCard from an external app (like the Contacts app) into Signal, we'll now convert it to a pretty Shared Contact message and allow you to choose which fields of the contact you wish to send.
This commit is contained in:
@@ -1391,12 +1391,16 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
|
||||
|
||||
private void setMedia(@Nullable Uri uri, @NonNull MediaType mediaType, int width, int height) {
|
||||
if (uri == null) return;
|
||||
attachmentManager.setMedia(glideRequests, uri, mediaType, getCurrentMediaConstraints(), width, height);
|
||||
|
||||
if (MediaType.VCARD.equals(mediaType) && isSecureText) {
|
||||
openContactShareEditor(uri);
|
||||
} else {
|
||||
attachmentManager.setMedia(glideRequests, uri, mediaType, getCurrentMediaConstraints(), width, height);
|
||||
}
|
||||
}
|
||||
|
||||
private void openContactShareEditor(Uri contactUri) {
|
||||
long id = ContactUtil.getContactIdFromUri(contactUri);
|
||||
Intent intent = ContactShareEditActivity.getIntent(this, Collections.singletonList(id));
|
||||
Intent intent = ContactShareEditActivity.getIntent(this, Collections.singletonList(contactUri));
|
||||
startActivityForResult(intent, GET_CONTACT_DETAILS);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user