equal
deleted
inserted
replaced
509 else |
509 else |
510 { |
510 { |
511 _DBGLOG_VERBOSE(AgmDebug::DebugLog("StoreL: Existing entry types is different to incoming entry's type");) |
511 _DBGLOG_VERBOSE(AgmDebug::DebugLog("StoreL: Existing entry types is different to incoming entry's type");) |
512 _DBGLOG_VERBOSE(AgmDebug::DebugLog("StoreL: Delete the existing entry and add the incoming entry as a new one");) |
512 _DBGLOG_VERBOSE(AgmDebug::DebugLog("StoreL: Delete the existing entry and add the incoming entry as a new one");) |
513 |
513 |
514 // if the entry is a different type, delete the old entry and add the new one |
514 // if the entry is a different type, add the new one first and delete only later |
|
515 // This change is needed if the entry having attachments, it will be shared by two |
|
516 //entries, so that attachments will not be deleted, while deleting it later. |
|
517 returnId = AddEntryL(aEntry); |
515 DeleteEntryL(*existingEntryToReplace, ETrue, iChangeFilter); |
518 DeleteEntryL(*existingEntryToReplace, ETrue, iChangeFilter); |
516 returnId = AddEntryL(aEntry); |
|
517 } |
519 } |
518 |
520 |
519 CleanupStack::PopAndDestroy(existingEntryToReplace); |
521 CleanupStack::PopAndDestroy(existingEntryToReplace); |
520 } |
522 } |
521 else |
523 else |