From: Dmytro Dragan Date: Fri, 1 Jul 2016 11:29:54 +0000 (+0300) Subject: TizenRefApp-6500 Discard Message Pop-up Displayed when Sharing File after Message... X-Git-Tag: submit/tizen_dev/20160719.083834~11 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F04%2F77904%2F2;p=profile%2Fmobile%2Fapps%2Fnative%2Fmessage.git TizenRefApp-6500 Discard Message Pop-up Displayed when Sharing File after Message Discard Change-Id: I1aff3358cf9a4359fd29d9a54607464931187de1 Signed-off-by: Dmytro Dragan --- diff --git a/src/MainApp/MainApp.cpp b/src/MainApp/MainApp.cpp index 7d55e4d..8ba9ea0 100644 --- a/src/MainApp/MainApp.cpp +++ b/src/MainApp/MainApp.cpp @@ -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: diff --git a/src/MainApp/MainApp.h b/src/MainApp/MainApp.h index 7b265fe..439075f 100644 --- a/src/MainApp/MainApp.h +++ b/src/MainApp/MainApp.h @@ -57,6 +57,7 @@ namespace Msg private: StandardWindow *m_pWindow; NaviFrameController *m_pRootController; + bool m_NeedToCloseApp; }; }