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