From: Denis Dolzhenko Date: Tue, 20 Sep 2016 08:52:38 +0000 (+0300) Subject: TizenRefApp-7230 Predictive search is showing after add recipient with "+" button. X-Git-Tag: submit/tizen/20160926.072415^2~8 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F00%2F88700%2F3;p=profile%2Fmobile%2Fapps%2Fnative%2Fmessage.git TizenRefApp-7230 Predictive search is showing after add recipient with "+" button. Change-Id: Ib393b8c0bb37cdabf8d47c2315fa9418312adc91 Signed-off-by: Denis Dolzhenko --- diff --git a/src/Conversation/Main/Controller/inc/Conversation.h b/src/Conversation/Main/Controller/inc/Conversation.h index 2b5259e..c033c0f 100644 --- a/src/Conversation/Main/Controller/inc/Conversation.h +++ b/src/Conversation/Main/Controller/inc/Conversation.h @@ -103,6 +103,7 @@ namespace Msg virtual void onMbeChanged(ConvRecipientsPanel &panel); virtual void onKeyDown(ConvRecipientsPanel &panel, Evas_Event_Key_Down &ev); virtual void onEntryFocusChanged(ConvRecipientsPanel &panel); + virtual void onEntryChanged(ConvRecipientsPanel &panel); virtual void onItemClicked(ConvRecipientsPanel &panel, MbeRecipientItem &item); // IBodyListener: diff --git a/src/Conversation/Main/Controller/src/Conversation.cpp b/src/Conversation/Main/Controller/src/Conversation.cpp index 0daf4ad..5786177 100644 --- a/src/Conversation/Main/Controller/src/Conversation.cpp +++ b/src/Conversation/Main/Controller/src/Conversation.cpp @@ -872,10 +872,18 @@ void Conversation::onKeyDown(ConvRecipientsPanel &panel, Evas_Event_Key_Down &ev void Conversation::onEntryFocusChanged(ConvRecipientsPanel &panel) { + MSG_LOG(""); if(!m_pRecipPanel->getEntryFocus() && m_pContactsList) m_pContactsList->clear(); } +void Conversation::onEntryChanged(ConvRecipientsPanel &panel) +{ + MSG_LOG(""); + if(m_pRecipPanel->isEntryEmpty() && m_pContactsList) + m_pContactsList->clear(); +} + void Conversation::onMbeChanged(ConvRecipientsPanel &panel) { MSG_LOG(""); diff --git a/src/Conversation/Recipients/Controller/inc/ConvRecipientsPanel.h b/src/Conversation/Recipients/Controller/inc/ConvRecipientsPanel.h index 7231495..ef12a4a 100644 --- a/src/Conversation/Recipients/Controller/inc/ConvRecipientsPanel.h +++ b/src/Conversation/Recipients/Controller/inc/ConvRecipientsPanel.h @@ -102,6 +102,7 @@ namespace Msg virtual void onEntryFocusChanged(ConvRecipientsPanel &panel) {}; virtual void onMbeChanged(ConvRecipientsPanel &panel) {}; virtual void onItemClicked(ConvRecipientsPanel &panel, MbeRecipientItem &item) {}; + virtual void onEntryChanged(ConvRecipientsPanel &panel) {}; }; } diff --git a/src/Conversation/Recipients/Controller/src/ConvRecipientsPanel.cpp b/src/Conversation/Recipients/Controller/src/ConvRecipientsPanel.cpp index c53efe3..deac254 100644 --- a/src/Conversation/Recipients/Controller/src/ConvRecipientsPanel.cpp +++ b/src/Conversation/Recipients/Controller/src/ConvRecipientsPanel.cpp @@ -253,6 +253,9 @@ void ConvRecipientsPanel::onEntryChanged() } else showButton(ContactButton); + + if(m_pListener) + m_pListener->onEntryChanged(*this); } void ConvRecipientsPanel::onContactButtonClicked() diff --git a/src/Conversation/Recipients/View/inc/ConvRecipientsPanelView.h b/src/Conversation/Recipients/View/inc/ConvRecipientsPanelView.h index d86ea97..9092b68 100644 --- a/src/Conversation/Recipients/View/inc/ConvRecipientsPanelView.h +++ b/src/Conversation/Recipients/View/inc/ConvRecipientsPanelView.h @@ -42,6 +42,7 @@ namespace Msg std::string getEntryText() const; void setEntryText(const std::string &utf8); bool isMbeEmpty() const; + bool isEntryEmpty() const; bool isMbeVisible() const; bool getEntryFocus() const; void setEntryFocus(bool val); @@ -68,7 +69,6 @@ namespace Msg void setMbe(MbeRecipientsView *pMbe); void showButton(ButtonType buttonType); - bool isEntryEmpty() const; void setEditMode(bool isEdit); void showInvalidIcon(bool show);