mirror of https://github.com/M66B/FairEmail.git
Show number of additional recipients
This commit is contained in:
parent
482a65ddf3
commit
4148b28f61
|
@ -784,6 +784,9 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
||||||
boolean outbox = EntityFolder.OUTBOX.equals(message.folderType);
|
boolean outbox = EntityFolder.OUTBOX.equals(message.folderType);
|
||||||
boolean outgoing = isOutgoing(message);
|
boolean outgoing = isOutgoing(message);
|
||||||
Address[] addresses = (outgoing && (viewType != ViewType.THREAD || !threading) ? message.to : message.senders);
|
Address[] addresses = (outgoing && (viewType != ViewType.THREAD || !threading) ? message.to : message.senders);
|
||||||
|
int recipients = (message.to == null || message.to.length < 2 ? 0 : message.to.length - 1) +
|
||||||
|
(message.cc == null ? 0 : message.cc.length) +
|
||||||
|
(message.bcc == null ? 0 : message.bcc.length);
|
||||||
boolean authenticated =
|
boolean authenticated =
|
||||||
!(Boolean.FALSE.equals(message.dkim) ||
|
!(Boolean.FALSE.equals(message.dkim) ||
|
||||||
Boolean.FALSE.equals(message.spf) ||
|
Boolean.FALSE.equals(message.spf) ||
|
||||||
|
@ -907,7 +910,11 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
||||||
? View.VISIBLE : View.GONE);
|
? View.VISIBLE : View.GONE);
|
||||||
ivSigned.setVisibility(message.signed > 0 ? View.VISIBLE : View.GONE);
|
ivSigned.setVisibility(message.signed > 0 ? View.VISIBLE : View.GONE);
|
||||||
ivEncrypted.setVisibility(message.encrypted > 0 ? View.VISIBLE : View.GONE);
|
ivEncrypted.setVisibility(message.encrypted > 0 ? View.VISIBLE : View.GONE);
|
||||||
tvFrom.setText(MessageHelper.formatAddresses(addresses, name_email, false));
|
if (recipients == 0 || viewType != ViewType.THREAD)
|
||||||
|
tvFrom.setText(MessageHelper.formatAddresses(addresses, name_email, false));
|
||||||
|
else
|
||||||
|
tvFrom.setText(context.getString(R.string.title_name_plus,
|
||||||
|
MessageHelper.formatAddresses(addresses, name_email, false), recipients));
|
||||||
tvFrom.setPaintFlags(tvFrom.getPaintFlags() & ~Paint.UNDERLINE_TEXT_FLAG);
|
tvFrom.setPaintFlags(tvFrom.getPaintFlags() & ~Paint.UNDERLINE_TEXT_FLAG);
|
||||||
tvSize.setText(message.totalSize == null ? null : Helper.humanReadableByteCount(message.totalSize, true));
|
tvSize.setText(message.totalSize == null ? null : Helper.humanReadableByteCount(message.totalSize, true));
|
||||||
tvSize.setVisibility(
|
tvSize.setVisibility(
|
||||||
|
|
|
@ -4608,7 +4608,11 @@ public class FragmentCompose extends FragmentBase {
|
||||||
|
|
||||||
int to = (draft.to == null ? 0 : draft.to.length);
|
int to = (draft.to == null ? 0 : draft.to.length);
|
||||||
int cc = (draft.cc == null ? 0 : draft.cc.length) + (draft.bcc == null ? 0 : draft.bcc.length);
|
int cc = (draft.cc == null ? 0 : draft.cc.length) + (draft.bcc == null ? 0 : draft.bcc.length);
|
||||||
tvTo.setText(MessageHelper.formatAddressesShort(draft.to) + (cc > 0 ? " +" + cc : ""));
|
if (cc == 0)
|
||||||
|
tvTo.setText(MessageHelper.formatAddressesShort(draft.to));
|
||||||
|
else
|
||||||
|
tvTo.setText(getString(R.string.title_name_plus,
|
||||||
|
MessageHelper.formatAddressesShort(draft.to), cc));
|
||||||
tvTo.setTextColor(Helper.resolveColor(getContext(),
|
tvTo.setTextColor(Helper.resolveColor(getContext(),
|
||||||
to + cc > RECIPIENTS_WARNING ? R.attr.colorWarning : android.R.attr.textColorPrimary));
|
to + cc > RECIPIENTS_WARNING ? R.attr.colorWarning : android.R.attr.textColorPrimary));
|
||||||
tvVia.setText(draft.identityEmail);
|
tvVia.setText(draft.identityEmail);
|
||||||
|
|
|
@ -99,6 +99,7 @@
|
||||||
<string name="title_notification_alert">\'%1$s\' server alert</string>
|
<string name="title_notification_alert">\'%1$s\' server alert</string>
|
||||||
|
|
||||||
<string name="title_name_count">%1$s (%2$s)</string>
|
<string name="title_name_count">%1$s (%2$s)</string>
|
||||||
|
<string name="title_name_plus">%1$s +%2$d</string>
|
||||||
<string name="title_factor_minutes">%1$d minutes</string>
|
<string name="title_factor_minutes">%1$d minutes</string>
|
||||||
|
|
||||||
<string name="menu_exit">Exit</string>
|
<string name="menu_exit">Exit</string>
|
||||||
|
|
Loading…
Reference in New Issue