TizenRefApp-6500 Discard Message Pop-up Displayed when Sharing File after Message... 04/77904/2
authorDmytro Dragan <dm.dragan@samsung.com>
Fri, 1 Jul 2016 11:29:54 +0000 (14:29 +0300)
committerDmytro Dragan <dm.dragan@samsung.com>
Fri, 1 Jul 2016 13:57:54 +0000 (16:57 +0300)
Change-Id: I1aff3358cf9a4359fd29d9a54607464931187de1
Signed-off-by: Dmytro Dragan <dm.dragan@samsung.com>
src/MainApp/MainApp.cpp
src/MainApp/MainApp.h

index 7d55e4d..8ba9ea0 100644 (file)
@@ -35,6 +35,7 @@ using namespace Msg;
 MainApp::MainApp()
     : m_pWindow(nullptr)
     , m_pRootController(nullptr)
+    , m_NeedToCloseApp(false)
 {
 
 }
@@ -96,12 +97,16 @@ const Window &MainApp::getWindow() const
 
 void MainApp::terminate()
 {
-    // Minimize window:
-    if(m_pWindow)
+    if(m_NeedToCloseApp)
+    {
+        // Close app completely
+        ui_app_exit();
+    }
+    else if(m_pWindow)
+    {
+        // Minimize window:
         m_pWindow->lower();
-
-   // Exit from application:
-   // ui_app_exit();
+    }
 }
 
 bool MainApp::onAppCreate()
@@ -147,11 +152,14 @@ void MainApp::onAppResume()
 void MainApp::onAppControl(app_control_h app_control)
 {
     TRACE;
-
     AppControlCommandRef cmd = AppControlParser::parse(app_control);
     if(!cmd)
         return;
 
+    app_control_launch_mode_e mode = APP_CONTROL_LAUNCH_MODE_SINGLE;
+    app_control_get_launch_mode(app_control, &mode);
+    m_NeedToCloseApp = (mode == APP_CONTROL_LAUNCH_MODE_GROUP);
+
     switch(cmd->getOperationType())
     {
         case AppControlCommand::OpDefault:
index 7b265fe..439075f 100644 (file)
@@ -57,6 +57,7 @@ namespace Msg
         private:
             StandardWindow *m_pWindow;
             NaviFrameController *m_pRootController;
+            bool m_NeedToCloseApp;
     };
 }