emailuis/emailui/src/FreestyleEmailUiViewBase.cpp
branchRCL_3
changeset 19 b13141f05c3d
parent 16 4ce476e64c59
child 24 b5fbb9b25d57
--- a/emailuis/emailui/src/FreestyleEmailUiViewBase.cpp	Wed Apr 14 15:42:15 2010 +0300
+++ b/emailuis/emailui/src/FreestyleEmailUiViewBase.cpp	Tue Apr 27 16:20:14 2010 +0300
@@ -126,13 +126,23 @@
         	{
         	iAppUi.ReturnFromPluginSettingsView();
         	}
-        // View activated succesfully. Change visible control group, but not
-        // when application is being sent to background.
+
+        // View activated succesfully
         if ( !iAppUi.SwitchingToBackground() )
             {
+            // Change visible control group
             DoTransition( EFalse );
             ActivateControlGroup();
             }
+        else
+            {
+            // View activated but Mail application is switching to background.
+            // Mail application was invoked from other app and now we`re going back
+            // to this other app. We have to force, that after going back to Mail
+            // application, ActivateControlGroup will be invoked in
+            // HandleAppForegroundEventL method
+            iWasActiveControlGroup = ETrue;
+            }
         }
     else
         {
@@ -466,8 +476,10 @@
             iWasActiveControlGroup = EFalse;
             }
         }
-    else
+    else if ( !iWasActiveControlGroup ) // If activation of control group isn`t forced
         {
+        // Mail application is switching to background.
+        // Remember state of control group to restore it when Mail goes foreground.
         iWasActiveControlGroup = ControlGroup().AcceptInput();
         }
     }