diff -r 139d4b7b2938 -r 99bcbff212ad emailuis/nmailui/src/nmmailboxserviceinterface.cpp --- a/emailuis/nmailui/src/nmmailboxserviceinterface.cpp Mon May 24 21:02:02 2010 +0300 +++ b/emailuis/nmailui/src/nmmailboxserviceinterface.cpp Fri May 28 13:56:43 2010 +0300 @@ -53,6 +53,7 @@ */ NmMailboxServiceInterface::~NmMailboxServiceInterface() { + NM_FUNCTION; } @@ -63,7 +64,7 @@ */ void NmMailboxServiceInterface::displayInboxByMailboxId(QVariant data) { - NMLOG("NmMailboxServiceInterface::displayInboxByMailboxId()"); + NM_FUNCTION; #ifndef NM_WINS_ENV @@ -72,6 +73,9 @@ mAsyncReqId = setCurrentRequestAsync(); + // Make sure that app stays background if user presses back in message list view + bool visible = mApplication->updateVisibilityState(); + // Verify that the ID matches one of the existing mailboxes. if (mailboxExistsById(mailboxNmId)) { @@ -101,7 +105,7 @@ // No mailbox found with the given ID. // if started as embedded, do not hide the app - if (!XQServiceUtil::isEmbedded()) { + if (!XQServiceUtil::isEmbedded() && !visible) { XQServiceUtil::toBackground(true); } @@ -124,7 +128,7 @@ */ bool NmMailboxServiceInterface::mailboxExistsById(const NmId &mailboxId) const { - NMLOG("NmMailboxServiceInterface::mailboxExistsById()"); + NM_FUNCTION; const NmMailboxListModel& mailboxListModel = mUiEngine.mailboxListModel(); int mailboxCount = mailboxListModel.rowCount();