TizenRefApp-7030 Make voice call option for email recipient 40/88340/2
authorDenis Dolzhenko <d.dolzhenko@samsung.com>
Fri, 16 Sep 2016 10:01:51 +0000 (13:01 +0300)
committerDenis Dolzhenko <d.dolzhenko@samsung.com>
Fri, 16 Sep 2016 11:00:57 +0000 (14:00 +0300)
Change-Id: I09ba47530f821f3d4cb012b7c56623eb87bb788b
Signed-off-by: Denis Dolzhenko <d.dolzhenko@samsung.com>
src/Conversation/Main/Controller/src/Conversation.cpp
src/Viewer/Controller/inc/Viewer.h
src/Viewer/Controller/src/Viewer.cpp

index ba34840..ce9d4de 100644 (file)
@@ -244,8 +244,11 @@ void Conversation::showUnsavedRecipientPopup(const std::string &address)
     }
     else if(m_Mode == ConversationMode)
     {
-        popup.appendItem(*new PopupAddressListItem(popup, msg("IDS_MSG_OPT_MAKE_VOICE_CALL"), address,
-                POPUPLIST_ITEM_PRESSED_CB(Conversation, onMakeVoiceItemPressed), this));
+        if(MsgUtils::isValidNumber(address))
+        {
+            popup.appendItem(*new PopupAddressListItem(popup, msg("IDS_MSG_OPT_MAKE_VOICE_CALL"), address,
+                    POPUPLIST_ITEM_PRESSED_CB(Conversation, onMakeVoiceItemPressed), this));
+        }
     }
 
     popup.appendItem(*new PopupAddressListItem(popup, msg("IDS_MSG_OPT_CREATE_CONTACT_ABB"), address,
@@ -810,6 +813,7 @@ void Conversation::showSendDpmNotif(const MsgAddressList &addressList)
         std::string text = msgArgs("IDS_MSG_POP_THE_SECURITY_POLICY_PREVENTS_SENDING_MESSAGES_TO_THE_FOLLOWING_RECIPIENTS_C_NPS", addresses.c_str());
         auto &popupMngr = getApp().getPopupManager();
         Popup &popup = popupMngr.getPopup();
+        popup.setAutoDismissBlockClickedFlag(true);
         popup.addButton(msgt("IDS_MSG_BUTTON_OK_ABB"), Popup::OkButtonId);
         popup.setContent(text);
         popup.show();
index 5c883a5..41896f5 100644 (file)
@@ -117,7 +117,7 @@ namespace Msg
             std::string createMessageText() const;
             void createSmilPlayer();
             void recipientClickHandler(const std::string &address);
-            void showRecipPopup(const std::string &title);
+            void showRecipPopup(const std::string &address);
             void updatePlayPos();
             void updateSubject();
             void updateButtonState();
index 55d371b..5682d50 100644 (file)
@@ -216,12 +216,13 @@ void Viewer::naviPrevButtonHandler()
     pop();
 }
 
-void Viewer::showRecipPopup(const std::string &title)
+void Viewer::showRecipPopup(const std::string &address)
 {
     PopupList &popup = getApp().getPopupManager().getPopupList();
-    popup.setTitle(title);
+    popup.setTitle(address);
     popup.setAutoDismissBlockClickedFlag(true);
-    popup.appendItem(msg("IDS_MSG_OPT_MAKE_VOICE_CALL"),  POPUPLIST_ITEM_PRESSED_CB(Viewer, onMakeVoiceItemPressed), this);
+    if(MsgUtils::isValidNumber(address))
+        popup.appendItem(msg("IDS_MSG_OPT_MAKE_VOICE_CALL"),  POPUPLIST_ITEM_PRESSED_CB(Viewer, onMakeVoiceItemPressed), this);
     popup.appendItem(msg("IDS_MSG_OPT_CREATE_CONTACT_ABB"),  POPUPLIST_ITEM_PRESSED_CB(Viewer, onCreateContactItemPressed), this);
     popup.appendItem(msg("IDS_MSG_OPT_UPDATE_CONTACT"),  POPUPLIST_ITEM_PRESSED_CB(Viewer, onUpdateContactItemPressed), this);
     popup.show();