calendarui/controller/src/calenbackgroundstate.cpp
branchRCL_3
changeset 5 42814f902fe6
parent 0 f979ecb2b13e
child 15 9711e452b5e9
--- a/calendarui/controller/src/calenbackgroundstate.cpp	Tue Feb 02 10:12:19 2010 +0200
+++ b/calendarui/controller/src/calenbackgroundstate.cpp	Fri Feb 19 22:49:53 2010 +0200
@@ -165,7 +165,14 @@
         {
         case ECalenNotifyAppForegrounded:
         	{
-        	SetCurrentState( aStateMachine, iPreviousState );
+        	if( iPreviousState == CCalenStateMachine::ECalenSendingState )
+        	    {
+        	    SetCurrentState( aStateMachine, CCalenStateMachine::ECalenIdleState );
+        	    }
+        	else
+        	    {
+                SetCurrentState( aStateMachine, iPreviousState );
+        	    }
         	// We set iOutstandingNotifications for two reasons.
         	// 1. The new state i.e. the state we are moving back can have notification info.
         	// 2. When we move to newstate we broadcast all notification from iOutstandingNotifications