TSAM-9262 Thread list screen display abnormal after change delete mode 30/93430/1 submit/tizen/20161024.120258
authorDenis Dolzhenko <d.dolzhenko@samsung.com>
Mon, 24 Oct 2016 08:50:31 +0000 (11:50 +0300)
committerDenis Dolzhenko <d.dolzhenko@samsung.com>
Mon, 24 Oct 2016 08:50:31 +0000 (11:50 +0300)
Change-Id: Iba9be4b97ba48744ee32a15fad39362581a6bd06
Signed-off-by: Denis Dolzhenko <d.dolzhenko@samsung.com>
res/edje/thread_genlist_theme.edc
src/Common/View/src/ListView.cpp
src/Conversation/ConvList/Controller/src/ConvList.cpp
src/Conversation/ConvList/View/inc/ConvListViewItem.h
src/Conversation/ConvList/View/src/ConvListViewItem.cpp
src/MsgThread/Controller/src/ThreadList.cpp
src/MsgThread/View/inc/ThreadListViewItem.h
src/MsgThread/View/src/ThreadListViewItem.cpp

index d9ca60a..e0de0c1 100755 (executable)
@@ -526,6 +526,13 @@ collections {
                 set_int(sub_end_text_visible, 0);
              }
           }
+          program { name: "reset_check";
+             signal: "elm,state,reset_check";
+             source: "elm";
+             script {
+                set_state(PART:"elm.padding.D.C", "default", 0.0);
+             }
+          }
           program { name: "pressed";
              signal: "elm,state,selected";
              source: "elm";
index 43bac5c..4c1be95 100644 (file)
@@ -261,14 +261,6 @@ void ListView::notifyListener(void *data, Evas_Object *obj, void *event_info, Li
 void ListView::setCheckMode(bool check)
 {
     m_CheckMode = check;
-    if (!check)
-    {
-        // Restore "default" state:
-        for(ListItem *item: getRealizedItems())
-        {
-            item->emitSignal("elm,state,default", "elm");
-        }
-    }
 }
 
 bool ListView::getCheckMode() const
index 8b14992..fce0b7f 100644 (file)
@@ -62,16 +62,19 @@ void ConvList::setListener(IConvListListener *l)
 void ConvList::setMode(ConvList::Mode mode)
 {
     m_Mode = mode;
-    bool isSelectMode = (m_Mode == ConvList::SelectMode);
-    MSG_LOG("isSelectMode: ",isSelectMode);
+    bool isCheckMode = (m_Mode == ConvList::SelectMode);
 
-    showSelectAllMode(isSelectMode);
-    m_pList->setCheckMode(isSelectMode);
-    if(isSelectMode)
+    showSelectAllMode(isCheckMode);
+    m_pList->setCheckMode(isCheckMode);
+    if(isCheckMode)
     {
         selectListItems(false);
         m_pSelectAll->setCheckState(false);
     }
+    else
+    {
+        ConvListViewItem::resetCheckMode(*m_pList);
+    }
     m_pList->updateRealizedItems();
 }
 
index dbeeaaf..7841d04 100644 (file)
@@ -37,6 +37,7 @@ namespace Msg
 
             ConvListViewItem(ConvItemType type);
             virtual ~ConvListViewItem();
+            static void resetCheckMode(ListView &listView);
 
         protected:
             virtual Evas_Object *getBubbleContent() = 0;
index 1fd7299..c3552f0 100644 (file)
@@ -202,3 +202,11 @@ void ConvListViewItem::updateItemType(ConvItemType type)
             break;
     }
 }
+
+void ConvListViewItem::resetCheckMode(ListView &listView)
+{
+    for(ListItem *item: listView.getRealizedItems())
+    {
+        item->emitSignal("elm,state,default", "elm");
+    }
+}
index 5e65fd4..00a26ce 100644 (file)
@@ -70,6 +70,7 @@ void ThreadList::setDeleteMode(bool value)
 {
     m_DeleteMode = value;
     setCheckMode(value);
+    ThreadListViewItem::resetCheckMode(*this);
     checkAllItems(false, true);
     showSelectAllItem(value);
 }
index 38e8491..53a1b3d 100644 (file)
@@ -40,6 +40,7 @@ namespace Msg
 
             void setState(State state, bool updateUi);
             State getState() const;
+            static void resetCheckMode(ListView &listView);
 
         protected:
             virtual std::string getName() = 0;
index d9deb94..b4a67f3 100644 (file)
@@ -170,3 +170,11 @@ std::string ThreadListViewItem::decorateDraftText(const std::string &text) const
 {
     return TextDecorator::make(text, draftTextStyle);
 }
+
+void ThreadListViewItem::resetCheckMode(ListView &listView)
+{
+    for(ListItem *item: listView.getRealizedItems())
+    {
+        item->emitSignal("elm,state,reset_check", "elm");
+    }
+}