diff -r f979ecb2b13e -r 42814f902fe6 calendarui/controller/src/calenbackgroundstate.cpp --- 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