diff --git a/src/com/android/email/activity/MessageListFragment.java b/src/com/android/email/activity/MessageListFragment.java index e02af7ec1..176162fcb 100644 --- a/src/com/android/email/activity/MessageListFragment.java +++ b/src/com/android/email/activity/MessageListFragment.java @@ -121,6 +121,7 @@ public class MessageListFragment extends ListFragment private Mailbox mMailbox; private boolean mIsEasAccount; private boolean mIsRefreshable; + private int mCountTotalAccounts; // Controller access private Controller mController; @@ -1033,6 +1034,7 @@ public class MessageListFragment extends ListFragment mMailbox = result.mMailbox; mIsEasAccount = result.mIsEasAccount; mIsRefreshable = result.mIsRefreshable; + mCountTotalAccounts = result.mCountTotalAccounts; getLoaderManager().initLoader(LOADER_ID_MESSAGES_LOADER, null, new MessagesLoaderCallback(mMailboxChanging)); @@ -1089,7 +1091,8 @@ public class MessageListFragment extends ListFragment // Update the list mListAdapter.changeCursor(cursor); - mListAdapter.setShowColorChips(mMailboxId < 0); // Show chips if combined view + // Show chips if combined view. + mListAdapter.setShowColorChips(mMailboxId < 0 && mCountTotalAccounts > 1); setListAdapter(mListAdapter); setListShown(true); diff --git a/src/com/android/email/data/MailboxAccountLoader.java b/src/com/android/email/data/MailboxAccountLoader.java index 645b8017a..e91921ee3 100644 --- a/src/com/android/email/data/MailboxAccountLoader.java +++ b/src/com/android/email/data/MailboxAccountLoader.java @@ -16,6 +16,7 @@ package com.android.email.data; +import com.android.email.provider.EmailContent; import com.android.email.provider.EmailContent.Account; import com.android.email.provider.EmailContent.Mailbox; @@ -35,14 +36,16 @@ public class MailboxAccountLoader extends AsyncTaskLoader