TizenRefApp-6766 Fixed close behavior of attach panel 36/90536/1
authorDmytro Dragan <dm.dragan@samsung.com>
Fri, 30 Sep 2016 10:53:48 +0000 (13:53 +0300)
committerDmytro Dragan <dm.dragan@samsung.com>
Fri, 30 Sep 2016 10:55:26 +0000 (13:55 +0300)
Change-Id: Idf56f8ecb560823035c0cbe026b360f118305343
Signed-off-by: Dmytro Dragan <dm.dragan@samsung.com>
src/Conversation/AppControl/inc/AttachPanel.h
src/Conversation/AppControl/src/AttachPanel.cpp
src/Conversation/Main/Controller/src/Conversation.cpp

index 85db96586b717fcd0bdc6cba38541765b42a52a6..e229e60fb43b1787ce80425a8f5f733da4359ce2 100644 (file)
@@ -40,6 +40,7 @@ namespace Msg
             void setListener(IAttachPanelListener *l);
             void show(bool value);
             bool isVisible() const;
+            bool isFullExpanded() const;
 
         private:
             AttachPanel(const AttachPanel&) = delete;
index cce9454011c352ce4a31b55b5f0e2e9c937447f6..ed4a1f89cb349daa76ca8c80c3f9a542f0423056 100644 (file)
@@ -72,6 +72,14 @@ bool AttachPanel::isVisible() const
     return res;
 }
 
+bool AttachPanel::isFullExpanded() const
+{
+    attach_panel_state_e res = ATTACH_PANEL_STATE_HIDDEN;
+    if(m_Handle)
+        attach_panel_get_state(m_Handle, &res);
+    return res == ATTACH_PANEL_STATE_FULL;
+}
+
 attach_panel_h AttachPanel::getAttachPanel()
 {
     if(m_Handle)
index 771407a0f44ebbe8ce8f81f9381ae1236fd8a099..ff6aa0b11a1fe31e80405920129d5cebdb993bfd 100644 (file)
@@ -1300,6 +1300,8 @@ void Conversation::onDeleteItemPressed(PopupListItem &item)
 {
     MSG_LOG("");
     item.getParent().destroy();
+    if (m_AttachPanel.isFullExpanded())
+        m_AttachPanel.show(false);
     m_pConvList->setMode(ConvList::SelectMode);
     updateNavibar();
 }
@@ -1308,6 +1310,8 @@ void Conversation::onAddRecipientsItemPressed(PopupListItem &item)
 {
     MSG_LOG("");
     item.getParent().destroy();
+    if (m_AttachPanel.isFullExpanded())
+        m_AttachPanel.show(false);
     createNewMsgThread();
     if(m_pRecipPanel)
         m_pRecipPanel->setEntryFocus(true);