emailuis/emailui/src/FreestyleEmailUiViewBase.cpp
branchRCL_3
changeset 35 e64954c2c8e2
parent 33 da5135c61bad
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();
         }
     }