Remove unused code, fix navigate to Compose Item 53/85653/2
authorDenis Dolzhenko <d.dolzhenko@samsung.com>
Fri, 26 Aug 2016 08:51:35 +0000 (11:51 +0300)
committerDenis Dolzhenko <d.dolzhenko@samsung.com>
Fri, 26 Aug 2016 08:54:41 +0000 (11:54 +0300)
Change-Id: Ifc3c23a78e9934284cc524be063552e6f5241de8
Signed-off-by: Denis Dolzhenko <d.dolzhenko@samsung.com>
src/Conversation/Body/Controller/inc/Body.h
src/Conversation/Body/Controller/src/Body.cpp
src/Conversation/ConvList/Controller/src/ComposeListItem.cpp
src/Conversation/ConvList/Controller/src/ConvList.cpp
src/Conversation/ConvList/View/inc/ComposeListViewItem.h
src/Conversation/ConvList/View/src/ComposeListViewItem.cpp

index a18b943ffcd40973a2e70ce35ce86aaf788de28f..9c8b242adecd00566db77bb0c39f0e6ca1752454 100644 (file)
@@ -83,7 +83,6 @@ namespace Msg
             void writeText(const Message &msg);
             void writeAttachments(const MessageMms &msg);
             void writeTextToFile();
-            void addAttachment( const std::string &filePath, const std::string &fileName = "");
             void runFileProcessing();
 
             PopupList &createPopupList(const std::string &title);
index a8bca9334dfc50166583be8971b1097cf190640d..48ff178b1ab4d640abef8a2470ea1c123037e3c8 100644 (file)
@@ -326,13 +326,6 @@ void Body::execCmd(const AppControlComposeRef &cmd)
     addMedia(path);
 }
 
-void Body::addAttachment(const std::string &filePath, const std::string &fileName)
-{
-    std::string newFilePath = m_WorkingDir->addFile(filePath);
-    if(!newFilePath.empty())
-        getComposeItem().addAttachment(newFilePath);
-}
-
 void Body::onMaxLengthReached()
 {
     MSG_LOG("");
index 4e08106605a8b923690ac34b888b8da47ac1c321..bdcb332cb6c1b6e88cedf4daad91885f9c15c3fe 100644 (file)
@@ -54,8 +54,8 @@ void ComposeListItem::addAttachment(const std::string &filePath)
     {
         m_BubbleEntityList.push_back(entity);
         updateBubblePart();
-        getOwner()->showItem(*this, ELM_GENLIST_ITEM_SCROLLTO_BOTTOM);
         show(true);
+        navigate();
         if(m_pListener)
             m_pListener->onAttachmentAdded({filePath});
     }
index e4aedc5583a3aaa0f0390be7ccc84a994e2d21c6..bacc75412c47a80283b5b03f48dbbd313b96fd7c 100644 (file)
@@ -172,7 +172,7 @@ void ConvList::navigateToBottom()
 {
     ListItem *item = m_pList->getLastItem();
     if(item)
-        m_pList->showItem(*item, ELM_GENLIST_ITEM_SCROLLTO_TOP);
+        m_pList->showItem(*item, ELM_GENLIST_ITEM_SCROLLTO_BOTTOM);
 }
 
 ConvListItem *ConvList::getItem(MsgId msgId) const
index 9e758e7cf636f3096811ed67a4231be3b5384907..f93368645fb9f987562713a8faa0da31b00de34e 100644 (file)
@@ -30,6 +30,7 @@ namespace Msg
             virtual ~ComposeListViewItem();
 
             void show(bool show);
+            void navigate();
 
         protected:
             virtual Evas_Object *getBubbleContent() = 0;
index 0672cb516f2ddb161d8345205eda30213b42894d..78d3c1deb97cd6026427dd89686421f999ef36b0 100644 (file)
@@ -70,6 +70,11 @@ bool ComposeListViewItem::getFilter(ListItem &item, void *key)
     return m_Visibility;
 }
 
+void ComposeListViewItem::navigate()
+{
+    getOwner()->showItem(*this, ELM_GENLIST_ITEM_SCROLLTO_BOTTOM);
+}
+
 void ComposeListViewItem::show(bool show)
 {
  // FIXME: setFilter() do not works properly