TizenRefApp-6500 Discard Message Pop-up Displayed when Sharing File after Message... 50/78150/1
authorDmytro Dragan <dm.dragan@samsung.com>
Fri, 1 Jul 2016 11:29:54 +0000 (14:29 +0300)
committerAndrey Klimenko <and.klimenko@samsung.com>
Mon, 4 Jul 2016 10:40:46 +0000 (03:40 -0700)
Change-Id: I1aff3358cf9a4359fd29d9a54607464931187de1
Signed-off-by: Dmytro Dragan <dm.dragan@samsung.com>
(cherry picked from commit 3cb7a4fabf51544e94c02360422164049bffbdc0)

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;
     };
 }