emailuis/emailui/src/FreestyleEmailUiViewBase.cpp
branchRCL_3
changeset 73 c8382f7b54ef
parent 64 3533d4323edc
child 80 726fba06891a
equal deleted inserted replaced
70:968773a0b6ef 73:c8382f7b54ef
   151         {
   151         {
   152         // In case of error, navigate to the previous view
   152         // In case of error, navigate to the previous view
   153         DeactivateControlGroup();
   153         DeactivateControlGroup();
   154         NavigateBackL();
   154         NavigateBackL();
   155         }
   155         }
       
   156     
       
   157     if( MailEditorId != Id() )// not for editor (when sending contact via mail)
       
   158         {
       
   159         //Reopen Contact details view if it was closed before
       
   160         CFSEmailUiContactHandler* contactHandler = NULL; // not owned
       
   161         CFsDelayedLoader* delLoader = CFsDelayedLoader::InstanceL(); // not owned
       
   162         if( delLoader )
       
   163             {
       
   164             contactHandler = delLoader->GetContactHandlerL();
       
   165             
       
   166             if( contactHandler && contactHandler->WasDetailsClosed())
       
   167                 {
       
   168                 contactHandler->ReopenContactDetailsL(iEikonEnv->WsSession());
       
   169                 }
       
   170             }
       
   171        }
   156     }
   172     }
   157 
   173 
   158 // ---------------------------------------------------------------------------
   174 // ---------------------------------------------------------------------------
   159 //
   175 //
   160 void CFsEmailUiViewBase::UpdateToolbarL()
   176 void CFsEmailUiViewBase::UpdateToolbarL()
   628         {
   644         {
   629         TUid prevView = iAppUi.ReturnToPreviousViewL();
   645         TUid prevView = iAppUi.ReturnToPreviousViewL();
   630 
   646 
   631         if ( iPreviousAppUid != KFSEmailUiUid && iPreviousAppUid != KNullUid )
   647         if ( iPreviousAppUid != KFSEmailUiUid && iPreviousAppUid != KNullUid )
   632             {
   648             {
       
   649             //don't send to background when back from Contact Details (CCAApp)
       
   650             CFSEmailUiContactHandler* contactHandler(NULL); // not owned
       
   651             CFsDelayedLoader* delLoader = CFsDelayedLoader::InstanceL(); // not owned
       
   652             if( delLoader )
       
   653                 {
       
   654                 contactHandler = delLoader->GetContactHandlerL();
       
   655                 }
       
   656             // for Contact Details, after contact was sent via mail, app shouldn't be sent to background
       
   657             if( contactHandler && iPreviousAppUid == contactHandler->GetDetailsAppUid() )
       
   658                 {
       
   659                 iSendToBackgroundOnDeactivation = EFalse;
       
   660                 iAppUi.SetSwitchingToBackground( EFalse );
       
   661                 }
   633             // Email app should be hidden once the view gets deactivated. Note that hiding
   662             // Email app should be hidden once the view gets deactivated. Note that hiding
   634             // should not happen before control group switching is over because that
   663             // should not happen before control group switching is over because that
   635             // may cause views of other Alfred apps to get distorted.
   664             // may cause views of other Alfred apps to get distorted.
   636             if( !iAppUi.EmbeddedAppIsPreviousApp() ) // if previous app is embedded app,
   665             else if( !iAppUi.EmbeddedAppIsPreviousApp() ) // if previous app is embedded app,
   637                 //do not need hide FSEmail app when previous app view gets deactivated.
   666                 //do not need hide FSEmail app when previous app view gets deactivated.
   638                 {
   667                 {
   639                 iSendToBackgroundOnDeactivation = ETrue;
   668                 iSendToBackgroundOnDeactivation = ETrue;
   640                 iAppUi.SetSwitchingToBackground( ETrue );
   669                 iAppUi.SetSwitchingToBackground( ETrue );
   641                 }
   670                 }