From: Oleksander Kostenko Date: Wed, 22 Jun 2016 08:26:21 +0000 (+0300) Subject: TSAM-5302 Display wrong message "Add recipients" X-Git-Tag: submit/tizen/20160622.131957^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=965437ae576e242b0f7d1ddad203d75b7e2d5300;p=profile%2Fmobile%2Fapps%2Fnative%2Fmessage.git TSAM-5302 Display wrong message "Add recipients" Change-Id: I52b40b72111b942752c943ed9137a9d7ab22a387 Signed-off-by: Oleksander Kostenko --- diff --git a/src/Conversation/Main/Controller/src/Conversation.cpp b/src/Conversation/Main/Controller/src/Conversation.cpp index 1786a5d..4a16a62 100644 --- a/src/Conversation/Main/Controller/src/Conversation.cpp +++ b/src/Conversation/Main/Controller/src/Conversation.cpp @@ -471,6 +471,13 @@ bool Conversation::readMsgAddress(Message &msg) void Conversation::sendMessage() { + if(m_pRecipPanel && + m_pRecipPanel->getEntryFocus() && + !m_pRecipPanel->getEntryText().empty() && + !m_pRecipPanel->addRecipientsFromEntry()) + return; + + if(!getApp().getSysSettingsManager().isSimInserted()) { showSendResultPopup(MsgTransport::SendNoSIM); diff --git a/src/Conversation/Recipients/Controller/inc/ConvRecipientsPanel.h b/src/Conversation/Recipients/Controller/inc/ConvRecipientsPanel.h index e91a864..9da8ee4 100644 --- a/src/Conversation/Recipients/Controller/inc/ConvRecipientsPanel.h +++ b/src/Conversation/Recipients/Controller/inc/ConvRecipientsPanel.h @@ -50,7 +50,7 @@ namespace Msg MbeRecipients::AppendItemStatus appendItem(const std::string &address, MsgAddress::AddressType addressType = MsgAddress::UnknownAddressType); void removeSelectedItem(); void editSelectedItem(); - void addRecipientsFromEntry(bool showPopup = true); + bool addRecipientsFromEntry(bool showPopup = true); private: // RecipientsPanelView: diff --git a/src/Conversation/Recipients/Controller/src/ConvRecipientsPanel.cpp b/src/Conversation/Recipients/Controller/src/ConvRecipientsPanel.cpp index 360dafe..609c983 100644 --- a/src/Conversation/Recipients/Controller/src/ConvRecipientsPanel.cpp +++ b/src/Conversation/Recipients/Controller/src/ConvRecipientsPanel.cpp @@ -86,7 +86,7 @@ void ConvRecipientsPanel::setListener(IConvRecipientsPanelListener *l) m_pListener = l; } -void ConvRecipientsPanel::addRecipientsFromEntry(bool showPopup) +bool ConvRecipientsPanel::addRecipientsFromEntry(bool showPopup) { MSG_LOG(""); std::string text = getEntryText(); @@ -102,11 +102,18 @@ void ConvRecipientsPanel::addRecipientsFromEntry(bool showPopup) } if(duplicateFound) + { showDuplicatedRecipientNotif(); + return false; + } setEntryText(result.invalidResult); if(!result.invalidResult.empty() && showPopup) + { showInvalidRecipientPopup(); + return false; + } + return true; } void ConvRecipientsPanel::update(const MsgAddressList &addressList)