uiservicetab/vimpststorage/src/cvimpststorageserviceview.cpp
branchRCL_3
changeset 10 78867dafe7eb
parent 0 5e5d6b214f4f
child 14 9fdee5e1da30
--- a/uiservicetab/vimpststorage/src/cvimpststorageserviceview.cpp	Fri Feb 19 22:41:11 2010 +0200
+++ b/uiservicetab/vimpststorage/src/cvimpststorageserviceview.cpp	Fri Mar 12 15:41:33 2010 +0200
@@ -547,10 +547,16 @@
 		}
 	else if( aUserId.Compare( iOwnContact->UserId() ) != 0 )
 		{
+	    _LIT (KNullWithSpace, " ");
 		TRACE( T_LIT("CVIMPSTStorageServiceView::SetOwnUserIdL iOwnContact was existing") );
+	    if(KNullWithSpace ().Compare(iOwnContact->UserId())!=0)
+	        { 
+	        iVPbkContactStore->RemoveAllVPbkContactsL(); // if user id is changed remove all contacts 	
+	        RemoveAllCacheContactsL();
+	        }
 		iOwnContact->SetUserIdL( aUserId );
 		iOwnContact->SetAvatarContentL(KNullDesC8,*iVPbkContactStore );
-		iVPbkContactStore->RemoveAllVPbkContactsL(); // if user id is changed remove all contacts 	
+
 		NotifyAllObserversL( TVIMPSTEnums::EStorageEventOwnUserChanged,NULL,iOwnContact,0 );
 		TRACE( T_LIT("CVIMPSTStorageServiceView::SetOwnUserIdL NotifyAllObserversL delivered") );
 		}