From: Denis Dolzhenko Date: Mon, 24 Oct 2016 08:50:31 +0000 (+0300) Subject: TSAM-9262 Thread list screen display abnormal after change delete mode X-Git-Tag: submit/tizen/20161024.120258^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=40637ba556b292008ef82179bd0492c83ec799e5;p=profile%2Fmobile%2Fapps%2Fnative%2Fmessage.git TSAM-9262 Thread list screen display abnormal after change delete mode Change-Id: Iba9be4b97ba48744ee32a15fad39362581a6bd06 Signed-off-by: Denis Dolzhenko --- diff --git a/res/edje/thread_genlist_theme.edc b/res/edje/thread_genlist_theme.edc index d9ca60af..e0de0c17 100755 --- a/res/edje/thread_genlist_theme.edc +++ b/res/edje/thread_genlist_theme.edc @@ -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"; diff --git a/src/Common/View/src/ListView.cpp b/src/Common/View/src/ListView.cpp index 43bac5c5..4c1be955 100644 --- a/src/Common/View/src/ListView.cpp +++ b/src/Common/View/src/ListView.cpp @@ -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 diff --git a/src/Conversation/ConvList/Controller/src/ConvList.cpp b/src/Conversation/ConvList/Controller/src/ConvList.cpp index 8b14992a..fce0b7f6 100644 --- a/src/Conversation/ConvList/Controller/src/ConvList.cpp +++ b/src/Conversation/ConvList/Controller/src/ConvList.cpp @@ -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(); } diff --git a/src/Conversation/ConvList/View/inc/ConvListViewItem.h b/src/Conversation/ConvList/View/inc/ConvListViewItem.h index dbeeaaf5..7841d049 100644 --- a/src/Conversation/ConvList/View/inc/ConvListViewItem.h +++ b/src/Conversation/ConvList/View/inc/ConvListViewItem.h @@ -37,6 +37,7 @@ namespace Msg ConvListViewItem(ConvItemType type); virtual ~ConvListViewItem(); + static void resetCheckMode(ListView &listView); protected: virtual Evas_Object *getBubbleContent() = 0; diff --git a/src/Conversation/ConvList/View/src/ConvListViewItem.cpp b/src/Conversation/ConvList/View/src/ConvListViewItem.cpp index 1fd72990..c3552f0d 100644 --- a/src/Conversation/ConvList/View/src/ConvListViewItem.cpp +++ b/src/Conversation/ConvList/View/src/ConvListViewItem.cpp @@ -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"); + } +} diff --git a/src/MsgThread/Controller/src/ThreadList.cpp b/src/MsgThread/Controller/src/ThreadList.cpp index 5e65fd4d..00a26ced 100644 --- a/src/MsgThread/Controller/src/ThreadList.cpp +++ b/src/MsgThread/Controller/src/ThreadList.cpp @@ -70,6 +70,7 @@ void ThreadList::setDeleteMode(bool value) { m_DeleteMode = value; setCheckMode(value); + ThreadListViewItem::resetCheckMode(*this); checkAllItems(false, true); showSelectAllItem(value); } diff --git a/src/MsgThread/View/inc/ThreadListViewItem.h b/src/MsgThread/View/inc/ThreadListViewItem.h index 38e8491a..53a1b3d7 100644 --- a/src/MsgThread/View/inc/ThreadListViewItem.h +++ b/src/MsgThread/View/inc/ThreadListViewItem.h @@ -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; diff --git a/src/MsgThread/View/src/ThreadListViewItem.cpp b/src/MsgThread/View/src/ThreadListViewItem.cpp index d9deb945..b4a67f37 100644 --- a/src/MsgThread/View/src/ThreadListViewItem.cpp +++ b/src/MsgThread/View/src/ThreadListViewItem.cpp @@ -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"); + } +}