mobilemessaging/unieditor/smsplugin/src/UniSmsPlugin.cpp
branchRCL_3
changeset 9 1d7827e39b52
parent 2 0bf1d54f37d9
child 13 a9c7e5670d17
--- a/mobilemessaging/unieditor/smsplugin/src/UniSmsPlugin.cpp	Tue Feb 02 00:08:43 2010 +0200
+++ b/mobilemessaging/unieditor/smsplugin/src/UniSmsPlugin.cpp	Fri Feb 19 22:47:38 2010 +0200
@@ -243,7 +243,18 @@
         iSmsHeader->StoreL( aStore );
         }
     }
-
+// -----------------------------------------------------------------------------
+// ResetUniAddresselist
+// -----------------------------------------------------------------------------
+//
+void CUniSmsPlugin::ResetUniAddresselist()
+    {
+    const CMsvRecipientList& uniRecipients = iUniMtm.AddresseeList();       
+    while ( uniRecipients.Count() )
+        {
+        iUniMtm.RemoveAddressee( 0 );
+        }  
+    }
 // -----------------------------------------------------------------------------
 // ConvertFromL
 // -----------------------------------------------------------------------------
@@ -264,10 +275,11 @@
     SmsMtmL()->SwitchCurrentEntryL( aId );
     SmsMtmL()->LoadMessageL();
     iUniMtm.SwitchCurrentEntryL( aId );
-    iUniMtm.LoadMessageL();
+    iUniMtm.LoadMessageL(); 
+    ResetUniAddresselist();
+    TPtrC name;
+    TPtrC address;  
 
-    TPtrC name;
-    TPtrC address;
 
 	const CSmsEmailFields& emailFields = SmsMtmL( )->SmsHeader( ).EmailFields();
 
@@ -641,8 +653,7 @@
     CleanupStack::PopAndDestroy( sendOptions ); 
 
     SmsMtmL()->SaveMessageL(*store, tEntry);
-
-    store->CommitL();        
+    store->CommitL();           
     tEntry.iSize = store->SizeL();
     if( AttachmentsSizeL( *store ) > 0 )
         {