TizenRefApp-5837 Implement Call on click on log item 01/60501/3
authorIryna Ferenchak <i.ferenchak@samsung.com>
Fri, 26 Feb 2016 15:11:02 +0000 (17:11 +0200)
committerAleksandr Sapozhnik <a.sapozhnik@samsung.com>
Tue, 1 Mar 2016 11:28:14 +0000 (03:28 -0800)
Change-Id: If7ed207f68756129631bde4285b2ff20bc2fd0ea
Signed-off-by: Iryna Ferenchak <i.ferenchak@samsung.com>
lib-logs/src/Logs/List/LogsView.cpp

index f4eac72..46acf08 100644 (file)
@@ -20,6 +20,8 @@
 #include "Logs/List/LogItem.h"
 #include "Logs/Details/DetailsView.h"
 
+#include "App/AppControlRequest.h"
+
 #include "Ui/Genlist.h"
 #include "Ui/Menu.h"
 #include "Ui/Navigator.h"
@@ -195,6 +197,15 @@ LogItem *LogsView::createLogItem(LogGroup *group)
                }
        });
 
+       item->setSelectCallback([this, group]() {
+               const char *number = group->getLogList().back()->getNumber();
+               if (number) {
+                       App::AppControl appControl = App::requestTelephonyCall(number);
+                       appControl.launch(nullptr, nullptr, false);
+                       appControl.detach();
+               }
+       });
+
        item->setDetailsCallback([this](LogItem *item) {
                getNavigator()->navigateTo(new DetailsView(item->getGroup()));
        });