videocollection/hgmyvideos/src/vcxhgmyvideoscollectionclient.cpp
branchRCL_3
changeset 21 55fa1ec415c6
parent 13 112a725ff2c2
child 23 8f0df5c82986
--- a/videocollection/hgmyvideos/src/vcxhgmyvideoscollectionclient.cpp	Tue Apr 27 16:40:33 2010 +0300
+++ b/videocollection/hgmyvideos/src/vcxhgmyvideoscollectionclient.cpp	Tue May 11 16:15:40 2010 +0300
@@ -60,7 +60,8 @@
 //
 CVcxHgMyVideosCollectionClient::CVcxHgMyVideosCollectionClient()
   : iCollectionOpenStatus( EVcxHgCollectionNotOpen ),
-    iPendingCommand( EVcxHgMyVideosCollectionCommandNone )
+    iPendingCommand( EVcxHgMyVideosCollectionCommandNone ),
+    iCollectionLevel( KErrNotFound ) 
     {
     }
 
@@ -185,7 +186,11 @@
         }
     else
         {
-        if ( CollectionLevelL() == KVcxMpxLevelVideos )
+        if ( iCollectionLevel == KErrNotFound )
+            {
+            iCollectionLevel = CollectionLevelL();
+            }
+        if ( iCollectionLevel == KVcxMpxLevelVideos )
             {
             iCollectionUtility->Collection().BackL();
             }
@@ -201,13 +206,15 @@
     IPTVLOGSTRING2_LOW_LEVEL( 
         "MPX My Videos UI # GetVideoListL(%d)", aIndex );
 
-    TInt collectionLevel = CollectionLevelL();
-
-    if ( collectionLevel == KVcxMpxLevelCategories )
+    if ( iCollectionLevel == KErrNotFound )
+        {
+        iCollectionLevel = CollectionLevelL();
+        }
+    if ( iCollectionLevel == KVcxMpxLevelCategories )
         {    
         iCollectionUtility->Collection().OpenL( aIndex );
         }
-    else if ( collectionLevel == KVcxMpxLevelVideos )
+    else if ( iCollectionLevel == KVcxMpxLevelVideos )
         {
         iCollectionUtility->Collection().BackL();
         iCollectionUtility->Collection().OpenL( aIndex );
@@ -568,6 +575,7 @@
                                 }
                             iCollectionUtility->Collection().OpenL();
                             }
+                        iCollectionLevel = CollectionLevelL();
                         }
                         break;                        
                     case TMPXCollectionMessage::ECollectionChanged: