messagingapp/msgui/conversationview/src/msgconversationbaseview.cpp
changeset 44 36f374c67aa8
parent 43 35b64624a9e7
child 47 5b14749788d7
child 52 12db4185673b
--- a/messagingapp/msgui/conversationview/src/msgconversationbaseview.cpp	Wed Jun 23 18:09:17 2010 +0300
+++ b/messagingapp/msgui/conversationview/src/msgconversationbaseview.cpp	Tue Jul 06 14:12:40 2010 +0300
@@ -43,6 +43,7 @@
 QTM_USE_NAMESPACE
 
 const int INVALID_MSGID = -1;
+const int INVALID_CONVID = -1;
 
 // LOCALIZATION
 #define LOC_SAVED_TO_DRAFTS    hbTrId("txt_messaging_dpopinfo_saved_to_drafts")
@@ -102,6 +103,8 @@
     mMainLayout->setContentsMargins(CONTENT_MARGIN, CONTENT_MARGIN, CONTENT_MARGIN, CONTENT_MARGIN);
 
     mMainLayout->addItem(mContactCard);
+    connect(mContactCard, SIGNAL(conversationIdChanged(qint64)), this,
+        SLOT(handleConversationIdChange(qint64)));
 
     /**
      * Create conversation view and connect to proper signals.
@@ -224,7 +227,21 @@
 //---------------------------------------------------------------	
 void MsgConversationBaseView::handleViewReady()
 {
-    ConversationsEngine::instance()->fetchMoreConversations();
+    mConversationView->onViewReady();
+}
+
+//---------------------------------------------------------------
+// MsgConversationBaseView::handleConversationIdChange
+//
+//---------------------------------------------------------------
+void MsgConversationBaseView::handleConversationIdChange(qint64 convId)
+{
+    if (INVALID_CONVID != convId && mConversationId != convId) {
+	
+        mConversationId = convId;        
+        // publsih conversation id
+        mSettingsManager->writeItemValue(mCVIdkey, (int) mConversationId);       
+    }
 }
 
 //---------------------------------------------------------------