2537 TMsvId serviceId; // not used here but needed by GetEntry function |
2537 TMsvId serviceId; // not used here but needed by GetEntry function |
2538 if ( iSession->GetEntry( aNewFolderId, serviceId, currentEntry ) |
2538 if ( iSession->GetEntry( aNewFolderId, serviceId, currentEntry ) |
2539 == KErrNone ) |
2539 == KErrNone ) |
2540 { |
2540 { |
2541 iMsgListContainer->ClearSelection(); |
2541 iMsgListContainer->ClearSelection(); |
2542 SetFolderL( aNewFolderId ); |
2542 |
|
2543 if ((oldId == KMsvGlobalOutBoxIndexEntryId) || (aNewFolderId == KMsvGlobalOutBoxIndexEntryId)) |
|
2544 { |
|
2545 iFolderId = aNewFolderId; |
|
2546 iMsgListContainer->MakeVisible(EFalse); |
|
2547 AppUi()->RemoveFromStack(iMsgListContainer); |
|
2548 delete iMsgListContainer; |
|
2549 iMsgListContainer = NULL; |
|
2550 CreateListboxL(); |
|
2551 iMsgListContainer->SetRect(ClientRect()); |
|
2552 AppUi()->AddToStackL( *this,iMsgListContainer ); |
|
2553 iMsgListContainer->ActivateL(); |
|
2554 iMsgListContainer->MakeVisible(ETrue); |
|
2555 iMsgListContainer->SetFolderL( iFolderId ); |
|
2556 } |
|
2557 else |
|
2558 { |
|
2559 SetFolderL( aNewFolderId ); |
|
2560 } |
|
2561 |
2543 TUid mtm = iMsgListContainer->FolderEntry().iMtm; |
2562 TUid mtm = iMsgListContainer->FolderEntry().iMtm; |
2544 if ( mtm == KSenduiMtmImap4Uid ) |
2563 if ( mtm == KSenduiMtmImap4Uid ) |
2545 { |
2564 { |
2546 FindInboxAndOpenItL(); |
2565 FindInboxAndOpenItL(); |
2547 } |
2566 } |