Show auth domain only

This commit is contained in:
M66B 2021-07-21 09:03:01 +02:00
parent fd029a633f
commit b0da760972
1 changed files with 4 additions and 3 deletions

View File

@ -3534,9 +3534,10 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
} }
if (message.from != null && message.from.length > 0) { if (message.from != null && message.from.length > 0) {
sb.insert(0, '\n'); String email = ((InternetAddress) message.from[0]).getAddress();
sb.insert(0, MessageHelper.formatAddresses( String domain = UriHelper.getEmailDomain(email);
message.from, MessageHelper.AddressFormat.EMAIL_ONLY, false)); if (!TextUtils.isEmpty(domain))
sb.insert(0, '\n').insert(0, domain);
} }
ToastEx.makeText(context, sb.toString(), Toast.LENGTH_LONG).show(); ToastEx.makeText(context, sb.toString(), Toast.LENGTH_LONG).show();