Show badge icon if any participant in the conversation is work contact

Precompute is_enterprise and stored the value in conversation table.
Include is_enterprise in the ConversationList view.

Change-Id: I2e31bd61c08d25a296aaa3e99cb24631ae2e7976
This commit is contained in:
Tony Mak
2016-06-29 10:58:33 +01:00
parent dec1aca348
commit 7ad7ac27f1
6 changed files with 100 additions and 15 deletions

View File

@@ -841,6 +841,11 @@ public class BugleDatabaseOperations {
values.put(ConversationColumns.NAME,
getDefaultConversationName(participants));
// Fill in IS_ENTERPRISE.
final boolean hasAnyEnterpriseContact =
ConversationListItemData.hasAnyEnterpriseContact(participants);
values.put(ConversationColumns.IS_ENTERPRISE, hasAnyEnterpriseContact);
fillParticipantData(values, participants);
// Used by background thread when refreshing conversation so conversation could be deleted.