TSAM-8868 Missing function when tap menu on conversation view 17/92617/2
authorOleksander Kostenko <o.kostenko@samsung.com>
Mon, 17 Oct 2016 14:24:26 +0000 (17:24 +0300)
committerDenis Dolzhenko <d.dolzhenko@samsung.com>
Mon, 17 Oct 2016 15:43:15 +0000 (08:43 -0700)
Change-Id: I2d76519a2c102d7615cf8dc44019ef5501246861
Signed-off-by: Oleksander Kostenko <o.kostenko@samsung.com>
src/Conversation/Main/Controller/src/Conversation.cpp

index ebf7bdf45c463eb70d6cf7152dca0cc139bfd6ac..15e846aae8991a34aa4378ef3b851a67365e9765 100644 (file)
@@ -923,6 +923,26 @@ void Conversation::showMainPopup()
 {
     PopupList &popup = getApp().getPopupManager().getPopupList(PopupList::MoreMenuPopup);
     popup.appendItem(msg("IDS_MSG_OPT_DELETE"), POPUPLIST_ITEM_PRESSED_CB(Conversation, onDeleteItemPressed), this);
+    if(m_AddressList && m_AddressList->getLength() == 1)
+    {
+        const std::string adress = m_AddressList->at(0).getAddress();
+        ContactAddressRef contactAddress = getApp().getContactManager().getContactAddress(adress);
+
+        if(contactAddress)
+        {
+            popup.appendItem(*new PopupPersonIdListItem(popup, msg("IDS_MSG_OPT_VIEW_CONTACT_DETAILS_ABB"), contactAddress->getOwnerId(),
+                    contactAddress->getOwnerType(), POPUPLIST_ITEM_PRESSED_CB(Conversation, onViewContactDetailsItemPressed), this));
+        }
+        else
+        {
+            popup.appendItem(*new PopupAddressListItem(popup, msg("IDS_MSG_OPT_MAKE_VOICE_CALL"), adress,
+                    POPUPLIST_ITEM_PRESSED_CB(Conversation, onMakeVoiceItemPressed), this));
+            popup.appendItem(*new PopupAddressListItem(popup, msg("IDS_MSG_OPT_CREATE_CONTACT_ABB"), adress,
+                        POPUPLIST_ITEM_PRESSED_CB(Conversation, onCreateContactItemPressed), this));
+            popup.appendItem(*new PopupAddressListItem(popup, msg("IDS_MSG_OPT_UPDATE_CONTACT"), adress,
+                        POPUPLIST_ITEM_PRESSED_CB(Conversation, onUpdateContactItemPressed), this));
+        }
+    }
     if(!isHiddenAddress())
         popup.appendItem(msg("IDS_MSG_TMBODY_ADD_OR_REMOVE_RECIPIENTS"), POPUPLIST_ITEM_PRESSED_CB(Conversation, onAddRecipientsItemPressed), this);
     popup.show();