TizenRefApp-5947 Wrong Menu Options for Empty Thread List - fixed 99/64499/3
authorMykola Alieksieiev <m.alieksieie@samsung.com>
Fri, 1 Apr 2016 11:52:36 +0000 (14:52 +0300)
committerAndrey Klimenko <and.klimenko@samsung.com>
Mon, 4 Apr 2016 15:41:29 +0000 (08:41 -0700)
Change-Id: I9437d0e808c0f96d5edbdbc9f78a87e4548103c8
Signed-off-by: Mykola Alieksieiev <m.alieksieie@samsung.com>
src/MsgThread/Controller/src/MsgThread.cpp

index 59e2b03..ffe9a7a 100644 (file)
@@ -85,8 +85,11 @@ void MsgThread::onAttached(ViewItem &item)
 void MsgThread::showMainCtxPopup()
 {
     PopupList &popup = getApp().getPopupManager().getPopupList();
-    popup.appendItem(msg("IDS_MSG_OPT_SEARCH"), POPUPLIST_ITEM_PRESSED_CB(MsgThread, onSearchItemPressed), this);
-    popup.appendItem(msg("IDS_MSG_OPT_DELETE"), POPUPLIST_ITEM_PRESSED_CB(MsgThread, onDeleteItemPressed), this);
+    if (!m_pThreadList->isEmpty())
+    {
+        popup.appendItem(msg("IDS_MSG_OPT_SEARCH"), POPUPLIST_ITEM_PRESSED_CB(MsgThread, onSearchItemPressed), this);
+        popup.appendItem(msg("IDS_MSG_OPT_DELETE"), POPUPLIST_ITEM_PRESSED_CB(MsgThread, onDeleteItemPressed), this);
+    }
     popup.appendItem(msg("IDS_MSG_OPT_SETTINGS"), POPUPLIST_ITEM_PRESSED_CB(MsgThread, onSettingsItemPressed), this);
     popup.show();
 }