mirror of
https://github.com/M66B/FairEmail.git
synced 2025-02-22 14:11:00 +00:00
Added contact info debug
This commit is contained in:
parent
f67d7ffc37
commit
a66c605e33
1 changed files with 12 additions and 2 deletions
|
@ -1526,12 +1526,17 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|||
if (main == null || !main.hasPhoto()) {
|
||||
ibAvatar.setImageDrawable(null);
|
||||
ibAvatar.setTag(null);
|
||||
ibAvatar.setEnabled(false);
|
||||
} else {
|
||||
ibAvatar.setImageBitmap(main.getPhotoBitmap());
|
||||
|
||||
Uri lookupUri = main.getLookupUri();
|
||||
ibAvatar.setTag(lookupUri);
|
||||
ibAvatar.setEnabled(lookupUri != null);
|
||||
|
||||
if (BuildConfig.DEBUG)
|
||||
ibAvatar.setContentDescription(main.getEmailAddress() + "=" + main.getType());
|
||||
|
||||
ibAvatar.setEnabled(lookupUri != null || BuildConfig.DEBUG);
|
||||
}
|
||||
ibAvatar.setVisibility(main == null || !main.hasPhoto() ? View.GONE : View.VISIBLE);
|
||||
|
||||
|
@ -3444,7 +3449,12 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|||
|
||||
private void onViewContact(TupleMessageEx message) {
|
||||
Uri lookupUri = (Uri) ibAvatar.getTag();
|
||||
if (lookupUri != null) {
|
||||
if (lookupUri == null) {
|
||||
if (BuildConfig.DEBUG) {
|
||||
CharSequence type = ibAvatar.getContentDescription();
|
||||
ToastEx.makeText(context, type, Toast.LENGTH_LONG).show();
|
||||
}
|
||||
} else {
|
||||
Intent intent = new Intent(Intent.ACTION_VIEW, lookupUri);
|
||||
try {
|
||||
context.startActivity(intent);
|
||||
|
|
Loading…
Reference in a new issue