messagingappbase/mce/src/MceMessageListView.cpp
branchCompilerCompatibility
changeset 20 43cbef41dd6d
parent 9 1d7827e39b52
child 21 c6838af47512
--- a/messagingappbase/mce/src/MceMessageListView.cpp	Sun Mar 28 16:36:08 2010 +0100
+++ b/messagingappbase/mce/src/MceMessageListView.cpp	Mon Mar 29 12:25:56 2010 +0100
@@ -2539,7 +2539,26 @@
         == KErrNone )
         {
         iMsgListContainer->ClearSelection();
-        SetFolderL( aNewFolderId );
+        
+        if ((oldId == KMsvGlobalOutBoxIndexEntryId) || (aNewFolderId == KMsvGlobalOutBoxIndexEntryId))
+            {
+            iFolderId = aNewFolderId;    
+            iMsgListContainer->MakeVisible(EFalse);
+            AppUi()->RemoveFromStack(iMsgListContainer);
+            delete iMsgListContainer;
+            iMsgListContainer = NULL;
+            CreateListboxL();
+            iMsgListContainer->SetRect(ClientRect());
+            AppUi()->AddToStackL( *this,iMsgListContainer );
+            iMsgListContainer->ActivateL();
+            iMsgListContainer->MakeVisible(ETrue);
+            iMsgListContainer->SetFolderL( iFolderId );
+            }
+        else
+            {
+            SetFolderL( aNewFolderId );
+            }
+        
         TUid mtm = iMsgListContainer->FolderEntry().iMtm;
         if ( mtm == KSenduiMtmImap4Uid )
             {