614 #endif |
611 #endif |
615 |
612 |
616 // This will mark the entry as "sent" or "delivered" or "failed" |
613 // This will mark the entry as "sent" or "delivered" or "failed" |
617 // or something similar... |
614 // or something similar... |
618 TBool doNotUpdate = EFalse; |
615 TBool doNotUpdate = EFalse; |
619 if ( iLogUpdatedEvent->Status().CompareF( KLogsMsgReadText ) == 0 ) |
616 if ( iLogUpdatedEvent->Status().CompareF( KLogsMsgReadText ) == 0 ) |
620 { |
617 { |
621 // If the status is already "read" we don't change it |
618 // If the status is already "read" we don't change it |
622 // This is a case where a delivery report arrives after a read report. |
619 // This is a case where a delivery report arrives after a read report. |
623 // Highly unlikely, but possible |
620 // Highly unlikely, but possible |
624 doNotUpdate = ETrue; |
621 doNotUpdate = ETrue; |
625 #ifndef _NO_MMSS_LOGGING_ |
622 #ifndef _NO_MMSS_LOGGING_ |
626 TMmsLogger::Log( _L("Status already updated to read - do not update again")); |
623 TMmsLogger::Log( _L("Status already updated to read - do not update again")); |
627 #endif |
624 #endif |
628 } |
625 } |
629 else |
626 else |
630 { |
627 { |
631 iLogUpdatedEvent->SetStatus( iLogEvent->Status() ); |
628 iLogUpdatedEvent->SetStatus( iLogEvent->Status() ); |
632 // Clear the event read flag in case the user has cleared the log view |
629 // Clear the event read flag in case the user has cleared the log view |
633 // We want this to become visible again. |
630 // We want this to become visible again. |
634 iLogUpdatedEvent->ClearFlags( KLogEventRead ); |
631 iLogUpdatedEvent->ClearFlags( KLogEventRead ); |
635 } |
632 } |
636 // if we have a message id, store it |
633 // if we have a message id, store it |
637 if ( ( iLogUpdatedEvent->Data().Length() <= 0 ) && |
634 if ( ( iLogUpdatedEvent->Data().Length() <= 0 ) && |
638 ( iLogEvent->Data().Length() > 0 ) ) |
635 ( iLogEvent->Data().Length() > 0 ) ) |
639 { |
636 { |
640 iLogUpdatedEvent->SetDataL( iLogEvent->Data() ); |
637 iLogUpdatedEvent->SetDataL( iLogEvent->Data() ); |