phonebookengines/contactsmodel/cntview/LocalView.cpp
branchRCL_3
changeset 23 5586b4d2ec3e
parent 0 e686773b3f54
child 64 c1e8ba0c2b16
--- a/phonebookengines/contactsmodel/cntview/LocalView.cpp	Wed Mar 31 21:13:53 2010 +0300
+++ b/phonebookengines/contactsmodel/cntview/LocalView.cpp	Wed Apr 14 15:45:35 2010 +0300
@@ -1681,36 +1681,40 @@
 	}
 
 TBool CContactLocalView::ContactCorrectType(TUid aType,TContactViewPreferences aTypeToInclude)
-	{
-	TBool correctType(EFalse);
-	if (aType==KUidContactCard || aType==KUidContactOwnCard)
-		{
-		// Ignore Unsorted Contacts flags & White Space flag
-		// catch non- contact views
-		// Should be EContactsOnly, EContactAndGroups & EICCEntriesAndContacts
-		if (0 == ((aTypeToInclude & ~(ESingleWhiteSpaceIsEmptyField | EIgnoreUnSorted | EUnSortedAtBeginning | EUnSortedAtEnd))
-				& (EGroupsOnly | EICCEntriesOnly))) // Ignore 'UnSorted' flags, exclude Groups Only & ICC Only 
-			{
-			correctType = ETrue;
-			}
-		}
+    {
+    TBool correctType = EFalse;
+
+    if (aType == KUidContactCard)
+        {
+        if (!(aTypeToInclude & (EGroupsOnly | EICCEntriesOnly)))
+            {
+            correctType = ETrue;
+            }
+        }
+    else if (aType == KUidContactOwnCard)
+        {
+        if (!(aTypeToInclude & (EGroupsOnly | EICCEntriesOnly | EContactCardsOnly)))
+            {
+            correctType = ETrue;
+            }
+        }
 	else if (aType==KUidContactGroup)
 		{
-		if (aTypeToInclude & (EGroupsOnly | EContactAndGroups))
-			{
-			correctType = ETrue;
-			}
-		}
+        if (aTypeToInclude & (EGroupsOnly | EContactAndGroups))
+            {
+            correctType = ETrue;
+            }
+        }
 	else if (aType == KUidContactICCEntry)
-		{
-		if (aTypeToInclude & (EICCEntriesOnly | EICCEntriesAndContacts))
-			{
-			correctType = ETrue;
-			}
-		}
-	return correctType;
-	}
+        {
+        if (aTypeToInclude & (EICCEntriesOnly | EICCEntriesAndContacts))
+            {
+            correctType = ETrue;
+            }
+        }
 
+    return correctType;
+    }
 
 void CIdleContactSorter::ContactPhbkSyncEventHandler(TPhonebookState aPhbkState)
 	{