emailuis/emailui/src/FreestyleEmailUiAttachmentsListModel.cpp
branchRCL_3
changeset 11 0396474f30f5
parent 8 e1b6206813b4
child 20 efd4f1afd43e
equal deleted inserted replaced
10:f5907b1a1053 11:0396474f30f5
   463         msgFound = IsMessage( iAttachments[i] );
   463         msgFound = IsMessage( iAttachments[i] );
   464         }
   464         }
   465     return msgFound;
   465     return msgFound;
   466     }
   466     }
   467 
   467 
       
   468 TBool CFSEmailUiAttachmentsListModel::IsThereAnyNonMessageAttachments() const
       
   469     {
       
   470     FUNC_LOG;
       
   471     TBool msgFound = EFalse;
       
   472     TInt attCount = iAttachments.Count();
       
   473     for ( TInt i = 0 ; i < attCount && !msgFound ; i++ )
       
   474         {
       
   475         msgFound = !IsMessage( iAttachments[i] );
       
   476         }
       
   477     return msgFound;
       
   478     }
       
   479 
   468 void CFSEmailUiAttachmentsListModel::UpdateListL( CFSMailMessage* aEmbeddedMessage )
   480 void CFSEmailUiAttachmentsListModel::UpdateListL( CFSMailMessage* aEmbeddedMessage )
   469 	{
   481 	{
   470     FUNC_LOG;
   482     FUNC_LOG;
   471 	iAttachments.Reset();
   483 	iAttachments.Reset();
   472 
   484 
   591 	{
   603 	{
   592     FUNC_LOG;
   604     FUNC_LOG;
   593 	TBool retVal = EFalse;
   605 	TBool retVal = EFalse;
   594 	TInt attCount = iAttachments.Count();
   606 	TInt attCount = iAttachments.Count();
   595     TInt savedCount( 0 );
   607     TInt savedCount( 0 );
       
   608     const CFSMailBox* mailbox( iAppUi.GetActiveMailbox() );
   596 	for ( TInt i = 0; i < attCount; i++ )
   609 	for ( TInt i = 0; i < attCount; i++ )
   597 		{
   610 		{
   598 		TBool downloadStarted = SaveAttachmentL( iAttachments[i], aFileName, savedCount );
   611         if ( !IsMessage( iAttachments[i] ) || 
   599 		retVal = downloadStarted || retVal;
   612                 ( mailbox && mailbox->HasCapability( EFSMboxCapaSupportsSavingOfEmbeddedMessages ) ) )
       
   613             {
       
   614             TBool downloadStarted = SaveAttachmentL( iAttachments[i], aFileName, savedCount );
       
   615             retVal = downloadStarted || retVal;
       
   616             }
   600 		}
   617 		}
   601 	if ( savedCount )
   618 	if ( savedCount )
   602 	    {
   619 	    {
   603 	    // <cmail>
   620 	    // <cmail>
   604 	    TFsEmailUiUtility::ShowFilesSavedToFolderNoteL( savedCount ); 	    
   621 	    TFsEmailUiUtility::ShowFilesSavedToFolderNoteL( savedCount );