Debuh: show max message send size

This commit is contained in:
M66B
2023-04-17 15:32:50 +02:00
parent 95079b7b70
commit cc06a8a673
2 changed files with 26 additions and 9 deletions

View File

@@ -68,7 +68,8 @@ public class AdapterIdentitySelect extends ArrayAdapter<TupleIdentityEx> {
View vwColor = view.findViewById(R.id.vwColor);
TextView text1 = view.findViewById(android.R.id.text1);
TextView text2 = view.findViewById(android.R.id.text2);
TextView tvExtra = view.findViewById(R.id.tvExtra);
TextView tvExtra1 = view.findViewById(R.id.tvExtra1);
TextView tvExtra2 = view.findViewById(R.id.tvExtra2);
vwColor.setBackgroundColor(identity.color == null ? Color.TRANSPARENT : identity.color);
vwColor.setVisibility(hasColor ? View.VISIBLE : View.GONE);
@@ -82,13 +83,16 @@ public class AdapterIdentitySelect extends ArrayAdapter<TupleIdentityEx> {
text2.setText(identity.accountName + ":" + identity.email);
}
tvExtra.setText(
tvExtra1.setText(identity.max_size == null ? null : Helper.humanReadableByteCount(identity.max_size));
tvExtra1.setVisibility(identity.max_size == null || !BuildConfig.DEBUG ? View.GONE : View.VISIBLE);
tvExtra2.setText(
(identity.cc == null ? "" : "+CC") +
(identity.bcc == null ? "" : "+BCC") +
(identity.replyto != null && !identity.replyto.equals(identity.email) ? "<<" : ""));
text2.setVisibility(single ? View.GONE : View.VISIBLE);
tvExtra.setVisibility(identity.cc == null && identity.bcc == null ? View.GONE : View.VISIBLE);
tvExtra2.setVisibility(identity.cc == null && identity.bcc == null ? View.GONE : View.VISIBLE);
return view;
}