phonebookui/Phonebook2/UIControls/src/CPbk2ThumbnailManager.cpp
branchRCL_3
changeset 26 0d28c1c5b6dd
parent 15 e8e3147d53eb
child 32 2828b4d142c0
--- a/phonebookui/Phonebook2/UIControls/src/CPbk2ThumbnailManager.cpp	Wed Apr 14 15:45:35 2010 +0300
+++ b/phonebookui/Phonebook2/UIControls/src/CPbk2ThumbnailManager.cpp	Tue Apr 27 16:23:35 2010 +0300
@@ -1077,9 +1077,21 @@
 void CPbk2ThumbnailManager::ContactAddedToView(
     MVPbkContactViewBase& /*aView*/, 
     TInt aIndex, 
-    const MVPbkContactLink& /*aContactLink*/ )
+    const MVPbkContactLink& aContactLink )
     {
-    iContactThumbnails.Insert( NULL, aIndex );
+    CPbk2TmItem* item = NULL;
+    TRAPD( err,
+        {
+        item = CPbk2TmItem::NewL( aContactLink.CloneLC(), aIndex );
+        CleanupStack::Pop();
+        });
+    if( KErrNone == err )
+        {
+        // set default icon index
+        item->SetIconArrayIndexAndId( iDefaultIconIndex, iDefaultIconId );
+        item->SetHasThumbnail( ETrue );
+        iContactThumbnails.Insert( item, aIndex );
+        }
     ResetIndexes();
     }