Optimized: Add or remove recipients. 21/89721/2
authorDenis Dolzhenko <d.dolzhenko@samsung.com>
Mon, 26 Sep 2016 12:19:41 +0000 (15:19 +0300)
committerDenis Dolzhenko <d.dolzhenko@samsung.com>
Mon, 26 Sep 2016 12:24:45 +0000 (15:24 +0300)
Change-Id: I9788f691a8b0f1ea5e6ffe147090675068b7a1e8
Signed-off-by: Denis Dolzhenko <d.dolzhenko@samsung.com>
src/Conversation/Main/Controller/inc/Conversation.h
src/Conversation/Main/Controller/src/Conversation.cpp

index 9e88d49..a2f803d 100644 (file)
@@ -67,7 +67,7 @@ namespace Msg
             void navigateToBottom();
             void execCmd(const AppControlComposeRef &cmd);
             void execCmd(const AppControlDefaultRef &cmd);
-            void setThreadId(ThreadId id, const std::string &searchWord = std::string());
+            void setThreadId(ThreadId id, const std::string &searchWord = std::string(), bool updateConvList = true, bool updateRecipPanel = true);
             void setListener(IConversationListener *listener);
             void forwardMsg(MsgId id);
 
@@ -181,7 +181,7 @@ namespace Msg
             void navigateToSlideShow(MsgId id);
             void setBodyFocus();
             void setRecipEntryFocus();
-            void resetMsgThread();
+            void resetMsgThread(bool updateConvList = true, bool updateRecipPanel = true);
             void updateActiveNotifPolicy();
             std::vector<MsgId> getMsgIdListForReadReport() const;
 
index e7894c7..8744d6a 100644 (file)
@@ -287,7 +287,7 @@ void Conversation::updateActiveNotifPolicy()
         getMsgEngine().getSettings().setActiveNotifPolicy(threadId);
 }
 
-void Conversation::setThreadId(ThreadId id, const std::string &searchWord)
+void Conversation::setThreadId(ThreadId id, const std::string &searchWord, bool updateConvList, bool updateRecipPanel)
 {
     MSG_LOG("Thread id = ", id);
     m_ThreadId = id;
@@ -301,18 +301,18 @@ void Conversation::setThreadId(ThreadId id, const std::string &searchWord)
     if(m_pBody)
         m_pBody->setMmsRecipFlag(getMsgEngine().getStorage().hasEmail(m_ThreadId));
 
-    if(m_pRecipPanel)
+    if(m_pRecipPanel && updateRecipPanel)
         m_pRecipPanel->update(m_ThreadId);
 
-    if(m_pConvList)
-        m_pConvList->setThreadId(id, searchWord);
+    if(m_pConvList && updateConvList)
+        m_pConvList->setThreadId(m_ThreadId, searchWord);
 
     markAsRead();
     updateActiveNotifPolicy();
     checkAndSetMsgType(true);
 }
 
-void Conversation::resetMsgThread()
+void Conversation::resetMsgThread(bool updateConvList, bool updateRecipPanel)
 {
     m_IsMms = false;
     m_DispIsMms = false;
@@ -321,7 +321,7 @@ void Conversation::resetMsgThread()
         ecore_idler_del(m_NnotifyConvertMsgTypeIdler);
         m_NnotifyConvertMsgTypeIdler = nullptr;
     }
-    setThreadId(ThreadId());
+    setThreadId(ThreadId(), "", updateConvList, updateRecipPanel);
 }
 
 void Conversation::setListener(IConversationListener *listener)
@@ -706,7 +706,7 @@ void Conversation::editDraftMsg(MsgId id)
 void Conversation::createNewMsgThread()
 {
     MsgAddressListRef addressList = getAddressList();
-    resetMsgThread();
+    resetMsgThread(false, true);
     if(m_pRecipPanel)
         m_pRecipPanel->update(addressList);
 }