uiservicetab/vimpststorage/src/cvimpststorageserviceview.cpp
branchRCL_3
changeset 19 76f25fb7a6a1
parent 14 9fdee5e1da30
equal deleted inserted replaced
18:36d367c62acb 19:76f25fb7a6a1
   565         if( contact )
   565         if( contact )
   566             {  
   566             {  
   567             TRACE(" contact found " );          
   567             TRACE(" contact found " );          
   568             break;
   568             break;
   569             }
   569             }
       
   570         if(!contact)
       
   571         	{
       
   572 			TInt acount =contactList->Count();
       
   573 			for( TInt i( 0 ); i < acount; ++i )
       
   574 				{
       
   575 				MVIMPSTStorageContact* acontact = &(contactList->operator [](i));
       
   576 				if( acontact->UserId().Compare( aUserId) == 0 )
       
   577 					{
       
   578 					contact=acontact;
       
   579 					break;
       
   580 					}
       
   581 				}
       
   582         	}
   570         }
   583         }
       
   584     
   571     return contact;
   585     return contact;
   572   	}
   586   	}
   573 // -----------------------------------------------------------------------------
   587 // -----------------------------------------------------------------------------
   574 // CVIMPSTStorageServiceView::FindContactByUserId
   588 // CVIMPSTStorageServiceView::FindContactByUserId
   575 // From MVIMPSTStorageServiceView.
   589 // From MVIMPSTStorageServiceView.
   788 		{
   802 		{
   789 		contactList = CreateContactListL(KFriendList,KNullDesC); 
   803 		contactList = CreateContactListL(KFriendList,KNullDesC); 
   790 		}
   804 		}
   791 	TRACE(" Before findcontactlink" ); 
   805 	TRACE(" Before findcontactlink" ); 
   792 	MVIMPSTStorageContact* contact = FindContactByLink(aContactLink);
   806 	MVIMPSTStorageContact* contact = FindContactByLink(aContactLink);
   793 	TRACE( " After findcontactlink " ); 
   807 	TRACE( " After findcontactlink check for findcontactuserid" ); 
       
   808 	if(!contact && aUserId.Length() )
       
   809 		{
       
   810 		MVIMPSTStorageContact* contact = FindContactByUserId( aUserId );
       
   811 		}
       
   812 	TRACE( " After findcontactuserid " ); 
   794 	if( !contact )
   813 	if( !contact )
   795 		{
   814 		{
   796 		TRACE( " contact not exist "); 
   815 		TRACE( " contact not exist "); 
   797 		TInt error = KErrGeneral;
   816 		TInt error = KErrGeneral;
   798 		TInt index = KErrNotFound;
   817 		TInt index = KErrNotFound;