--- a/messagingapp/msgui/appengine/src/conversationlistchangehandler.cpp Mon May 03 12:29:07 2010 +0300
+++ b/messagingapp/msgui/appengine/src/conversationlistchangehandler.cpp Fri Jun 25 15:47:40 2010 +0530
@@ -99,7 +99,8 @@
for (TInt i = 0; i < aClientConversationList.Count(); ++i)
{
CCsClientConversation *entry = aClientConversationList[i]->CloneL();
- mClientConversationList.AppendL(entry);
+ mClientConversationList.InsertInOrderAllowRepeats( entry,
+ ConversationsListChangeHandler::CompareByConvTimeStamp );
}
if (aClientConversationList.Count() > 0)
@@ -137,6 +138,17 @@
}
//-----------------------------------------------------------------------
+// This is for handling partial delete conversation event asynchronusly from the server
+//-----------------------------------------------------------------------
+//
+
+void ConversationsListChangeHandler::PartialDeleteConversationList(
+ const CCsClientConversation& aClientConversation)
+{
+ ConversationsEngine::instance()->emitConversationListModelEntryDeleted( aClientConversation.GetConversationEntryId() );
+}
+
+//-----------------------------------------------------------------------
// This is for handling modify conversation event asynchronusly from the server
//-----------------------------------------------------------------------
//
@@ -180,7 +192,7 @@
if (mCurrentIndex < mClientConversationList.Count())
{
mConvSummaryModel->addRow(
- * (mClientConversationList[mCurrentIndex]));
+ * (mClientConversationList[mCurrentIndex]),true);
mCurrentIndex++;
}
else
@@ -213,4 +225,24 @@
}
+// ----------------------------------------------------------------------------
+// ConversationsListChangeHandler::CompareByConvTimeStamp
+// ---------------------------------------------------------------------------
+TInt ConversationsListChangeHandler::CompareByConvTimeStamp(const CCsClientConversation& aObj1,
+ const CCsClientConversation& aObj2)
+ {
+ TInt64 timestamp1 = aObj1.GetConversationEntry()->TimeStamp();
+ TInt64 timestamp2 = aObj2.GetConversationEntry()->TimeStamp();
+
+ if (timestamp1 == timestamp2)
+ {
+ return 0;
+ }
+ else if (timestamp1 < timestamp2)
+ {
+ return 1;
+ }
+ return -1;
+ }
+
// EOF