1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-12-25 09:08:49 -05:00

Cleanup logic for controlling visibility of email field for each

account.
This commit is contained in:
Daniel Applebaum 2010-05-09 15:50:58 +00:00
parent a1b8b2c67c
commit 6562d43f56

View File

@ -803,11 +803,20 @@ public class Accounts extends K9ListActivity implements OnItemClickListener, OnC
if (stats != null && account instanceof Account && stats.size >= 0) if (stats != null && account instanceof Account && stats.size >= 0)
{ {
holder.email.setText(SizeFormatter.formatSize(Accounts.this, stats.size)); holder.email.setText(SizeFormatter.formatSize(Accounts.this, stats.size));
holder.email.setVisibility(View.VISIBLE);
} }
else else
{ {
if (account.getEmail().equals(account.getDescription()))
{
holder.email.setVisibility(View.GONE);
}
else
{
holder.email.setVisibility(View.VISIBLE);
holder.email.setText(account.getEmail()); holder.email.setText(account.getEmail());
} }
}
String description = account.getDescription(); String description = account.getDescription();
if (description == null || description.length() == 0) if (description == null || description.length() == 0)
@ -817,11 +826,6 @@ public class Accounts extends K9ListActivity implements OnItemClickListener, OnC
holder.description.setText(description); holder.description.setText(description);
if (account.getEmail().equals(account.getDescription()))
{
holder.email.setVisibility(View.GONE);
}
Integer unreadMessageCount = null; Integer unreadMessageCount = null;
if (stats != null) if (stats != null)
{ {