For my own convenience

pull/207/head
M66B 3 years ago
parent a4f7e69fa5
commit c9adb9dbda

@ -956,6 +956,8 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
ibNotifyContact.setOnClickListener(this);
ibPinContact.setOnClickListener(this);
ibAddContact.setOnClickListener(this);
if (BuildConfig.DEBUG)
ibAddContact.setOnLongClickListener(this);
ibCopyHeaders.setOnClickListener(this);
ibCloseHeaders.setOnClickListener(this);
@ -1063,6 +1065,8 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
ibSearchContact.setOnClickListener(null);
ibNotifyContact.setOnClickListener(null);
ibPinContact.setOnClickListener(null);
ibAddContact.setOnLongClickListener(null);
if (BuildConfig.DEBUG)
ibAddContact.setOnClickListener(null);
ibCopyHeaders.setOnClickListener(null);
@ -3990,6 +3994,9 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
if (id == R.id.ibFlagged) {
onMenuColoredStar(message);
return true;
} else if (id == R.id.ibAddContact) {
onGpa(message);
return true;
} else if (id == R.id.tvFolder) {
onGotoFolder(message);
return true;
@ -4342,6 +4349,23 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
}.execute(context, owner, args, "message:flag");
}
private void onGpa(TupleMessageEx message) {
Address[] from;
if (message.reply == null || message.reply.length == 0)
from = (isOutgoing(message) ? message.to : message.from);
else
from = message.reply;
if (from == null || from.length == 0)
return;
String email = ((InternetAddress) from[0]).getAddress();
if (TextUtils.isEmpty(email))
return;
Uri uri = Uri.parse(BuildConfig.GPA_URI).buildUpon()
.appendQueryParameter("search", email)
.build();
Helper.view(context, uri, true);
}
private void onGotoFolder(TupleMessageEx message) {
LocalBroadcastManager lbm = LocalBroadcastManager.getInstance(context);
if (EntityFolder.OUTBOX.equals(message.folderType))

Loading…
Cancel
Save