messagingapp/msgui/appengine/src/conversationchangehandler.cpp
changeset 37 518b245aa84c
parent 23 238255e8b033
child 48 4f501b74aeb1
equal deleted inserted replaced
25:84d9eb65b26f 37:518b245aa84c
   102 //
   102 //
   103 void ConversationsChangeHandler::ModifyConversation(
   103 void ConversationsChangeHandler::ModifyConversation(
   104     const CCsConversationEntry& aConvEntry)
   104     const CCsConversationEntry& aConvEntry)
   105 {
   105 {
   106     mConversationsModel->addRow(aConvEntry, true);
   106     mConversationsModel->addRow(aConvEntry, true);
   107     ConversationsEngine::instance()->emitConversationModelUpdated();
       
   108 }
   107 }
   109 
   108 
   110 // ---------------------------------------------------------------------------
   109 // ---------------------------------------------------------------------------
   111 // Handling deletion of conversation entry from the server
   110 // Handling deletion of conversation entry from the server
   112 // ---------------------------------------------------------------------------
   111 // ---------------------------------------------------------------------------
   113 //
   112 //
   114 void ConversationsChangeHandler::DeleteConversation(
   113 void ConversationsChangeHandler::DeleteConversation(
   115     const CCsConversationEntry& aConvEntry)
   114     const CCsConversationEntry& aConvEntry)
   116 {
   115 {
   117     mConversationsModel->deleteRow(aConvEntry.EntryId());
   116     mConversationsModel->deleteRow(aConvEntry.EntryId());
   118     ConversationsEngine::instance()->emitConversationModelUpdated();
   117     
       
   118     //check if the CV model row count has become zero
       
   119     // then needs to emit signal
       
   120     if (mConversationsModel->rowCount() == 0)
       
   121     {
       
   122         mConversationsModel->emitConversationViewEmpty();
       
   123     }
   119 }
   124 }
   120 
   125 
   121 //-----------------------------------------------------------------------
   126 //-----------------------------------------------------------------------
   122 // This is for handling modify conversation event asynchronusly from the server
   127 // This is for handling modify conversation event asynchronusly from the server
   123 //-----------------------------------------------------------------------
   128 //-----------------------------------------------------------------------