Fix execution of default app_control 18/132718/1 submit/tizen/20170608.100456 submit/tizen/20170615.132908 submit/tizen/20170619.120315 submit/tizen/20170627.081509 submit/tizen/20170705.074936
authorDenis Dolzhenko <d.dolzhenko@samsung.com>
Wed, 7 Jun 2017 08:18:40 +0000 (11:18 +0300)
committerDenis Dolzhenko <d.dolzhenko@samsung.com>
Wed, 7 Jun 2017 08:18:40 +0000 (11:18 +0300)
Change-Id: I48da7fbba4b8b1d4f5bdb7e2c3e77a37d93da24d
Signed-off-by: Denis Dolzhenko <d.dolzhenko@samsung.com>
src/Common/Controller/src/NaviFrameController.cpp

index 2829a3856526824982023ed969b8e6c95fd19e08..f01b8e3a6b33195e7d954151268d40b3f91eb3c7 100644 (file)
@@ -70,7 +70,6 @@ bool NaviFrameController::prepare(const AppControlCommand &cmd)
 void NaviFrameController::execCmd(const AppControlDefaultRef &cmd)
 {
     if (prepare(*cmd)) {
-        AppControlLauncher::getInst().terminate();
         AppControlDefault::DefaultType type = cmd->getDefaultType();
         MsgThread *thread = getTopFrame<MsgThread>(); // Check if thread is open
         if (!thread)
@@ -80,14 +79,14 @@ void NaviFrameController::execCmd(const AppControlDefaultRef &cmd)
         MessageRef msg = getMsgEngine().getStorage().getMessage(cmd->getMessageId()); //To avoid opening conversation if MsgId is invalid
         if (type != AppControlDefault::MainType && msg != nullptr) {
             if (conv) {
+                AppControlLauncher::getInst().terminate();
                 promote(*conv);
                 conv->execCmd(cmd);
-            } else if (!conv) {
-                if (type == AppControlDefault::ViewType || type == AppControlDefault::ReplyType || isUnreadNotificationSingle(type)) {
-                    auto *conversation = new Conversation(*this);
-                    push(*conversation);
-                    conversation->execCmd(cmd);
-                }
+            } else if (type == AppControlDefault::ViewType || type == AppControlDefault::ReplyType || isUnreadNotificationSingle(type)) {
+                AppControlLauncher::getInst().terminate();
+                conv = new Conversation(*this);
+                push(*conv);
+                conv->execCmd(cmd);
             }
         }
     }