Small improvement

pull/212/head
M66B 2 years ago
parent c339b13273
commit ebcf36fb4c

@ -5288,12 +5288,14 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
froms.add(from); froms.add(from);
int at = from.indexOf('@'); int at = from.indexOf('@');
String domain = (at < 0 ? from : from.substring(at)); String domain = (at < 0 ? from : from.substring(at));
if (!Objects.equals(from, domain))
domains.add(domain); domains.add(domain);
} }
cbNotAgainSender.setText(context.getString(R.string.title_no_ask_for_again, cbNotAgainSender.setText(context.getString(R.string.title_no_ask_for_again,
TextUtils.join(", ", froms))); TextUtils.join(", ", froms)));
cbNotAgainDomain.setText(context.getString(R.string.title_no_ask_for_again, cbNotAgainDomain.setText(context.getString(R.string.title_no_ask_for_again,
TextUtils.join(", ", domains))); TextUtils.join(", ", domains)));
cbNotAgainDomain.setVisibility(domains.size() > 0 ? View.VISIBLE : View.GONE);
} }
cbNotAgainDomain.setEnabled(false); cbNotAgainDomain.setEnabled(false);

Loading…
Cancel
Save