--- a/emailuis/emailui/src/FreestyleEmailUiAppui.cpp Wed Jun 09 09:22:57 2010 +0300
+++ b/emailuis/emailui/src/FreestyleEmailUiAppui.cpp Mon Jun 21 15:20:54 2010 +0300
@@ -1286,7 +1286,7 @@
{
CFSEmailUiMailListModelItem* item =
static_cast<CFSEmailUiMailListModelItem*>(iMailListVisualiser->Model()->Item(i+1));
- if ( item->ModelItemType() == ETypeMailItem )
+ if ( item && item->ModelItemType() == ETypeMailItem )
{
ret++;
}
@@ -2159,14 +2159,19 @@
case TFSEventMailboxOnline:
case TFSEventMailboxOffline:
{
- if (aEvent == TFSEventMailboxOnline)
- {
- UpdateTitlePaneConnectionStatus(EForceToConnected);
+ //must check event go to right MailBox
+ if( aMailbox == GetActiveMailboxId() )
+ {
+ if (aEvent == TFSEventMailboxOnline)
+ {
+ UpdateTitlePaneConnectionStatus(EForceToConnected);
+ }
+ else if (aEvent == TFSEventMailboxOffline)
+ {
+ UpdateTitlePaneConnectionStatus(EForceToDisconnected);
+ }
}
- else if (aEvent == TFSEventMailboxOffline)
- {
- UpdateTitlePaneConnectionStatus(EForceToDisconnected);
- }
+
// Cancel all ongoing downloads for the disconnected mailbox
if (iDwnldMediator && aEvent == TFSEventMailboxOffline)
{
@@ -2203,6 +2208,11 @@
{
TBool tryRunningFakeSyncAnim( EFalse );
TSSMailSyncState* newSyncState = static_cast<TSSMailSyncState*>( aParam1 );
+
+ //must check event go to right MailBox
+ if( aMailbox != GetActiveMailboxId() )
+ break;
+
if ( newSyncState !=0 && *newSyncState )
{
switch ( *newSyncState )