Add back a way to access quick contact from conversation

Closes #7051
// FREEBIE
pull/1/head
Christian Ascheberg 8 years ago committed by Moxie Marlinspike
parent 23a23ebd72
commit 69e656af76

@ -856,6 +856,18 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
}
}
private boolean handleDisplayQuickContact() {
if (recipient.getAddress().isGroup()) return false;
if (recipient.getContactUri() != null) {
ContactsContract.QuickContact.showQuickContact(ConversationActivity.this, titleView, recipient.getContactUri(), ContactsContract.QuickContact.MODE_LARGE, null);
} else {
handleAddToContacts();
}
return true;
}
private void handleAddAttachment() {
if (this.isMmsEnabled || isSecureText) {
if (attachmentTypeSelector == null) {
@ -1209,6 +1221,7 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
});
titleView.setOnClickListener(v -> handleConversationSettings());
titleView.setOnLongClickListener(v -> handleDisplayQuickContact());
titleView.setOnBackClickedListener(view -> super.onBackPressed());
unblockButton.setOnClickListener(v -> handleUnblock());
makeDefaultSmsButton.setOnClickListener(v -> handleMakeDefaultSms());

@ -84,6 +84,12 @@ public class ConversationTitleView extends RelativeLayout {
this.avatar.setOnClickListener(listener);
}
@Override
public void setOnLongClickListener(@Nullable OnLongClickListener listener) {
this.content.setOnLongClickListener(listener);
this.avatar.setOnLongClickListener(listener);
}
public void setOnBackClickedListener(@Nullable OnClickListener listener) {
this.back.setOnClickListener(listener);
}

Loading…
Cancel
Save