emailuis/emailui/src/ncscomposeview.cpp
branchRCL_3
changeset 73 c8382f7b54ef
parent 70 968773a0b6ef
child 80 726fba06891a
--- a/emailuis/emailui/src/ncscomposeview.cpp	Tue Sep 14 20:48:24 2010 +0300
+++ b/emailuis/emailui/src/ncscomposeview.cpp	Wed Sep 15 11:52:37 2010 +0300
@@ -347,7 +347,19 @@
     // once from BaseView.
     if ( iLaunchParams.iActivatedExternally )
         {
-        iAppUi.ViewActivatedExternallyL( Id() );
+        //notify Contact details view to close on external activation
+        CFSEmailUiContactHandler* contactHandler = NULL; // not owned
+        CFsDelayedLoader* delLoader = CFsDelayedLoader::InstanceL(); // not owned
+        if( delLoader )
+            {
+            contactHandler = delLoader->GetContactHandlerL();
+            
+            if( contactHandler && aPrevViewId.iViewUid == contactHandler->GetDetailsViewUid() )
+                {
+                contactHandler->CloseContactDetailsL();
+                }
+            iAppUi.ViewActivatedExternallyL( Id() );
+            }
         }
 
     // Try to get the mailbox by other means if using launch parameters failed
@@ -1719,8 +1731,7 @@
         TFsEmailUiUtility::CreatePlainTextPartL( 
                 *iNewMessage, iNewMessageTextPart );
         InitFieldsL();
-        TBool spaceInBegin = ETrue;
-        IncludeMessageTextL(spaceInBegin);
+        IncludeMessageTextL();
         AttachmentsListControl()->Model()->Clear();
         GetAttachmentsFromMailL();
         SetAttachmentLabelContentL();
@@ -2520,7 +2531,13 @@
             CFSMailMessagePart* msgPart = 
                 iNewMessage->ChildPartL( item->MailMsgPartId() );
             CleanupStack::PushL( msgPart );
+            
+            //We are forbidding to change MSK label during OpenAttachmentL
+            //because dialog/popup can be open
+            iContainer->SwitchChangeMskOff( ETrue );
             TFsEmailUiUtility::OpenAttachmentL( *msgPart );
+            iContainer->SwitchChangeMskOff( EFalse );
+            
             CleanupStack::PopAndDestroy( msgPart );
             }
         }