equal
deleted
inserted
replaced
67 mAsyncReqId = setCurrentRequestAsync(); |
67 mAsyncReqId = setCurrentRequestAsync(); |
68 |
68 |
69 // Make sure that app stays background if user presses back in message list view |
69 // Make sure that app stays background if user presses back in message list view |
70 bool visible = mApplication->updateVisibilityState(); |
70 bool visible = mApplication->updateVisibilityState(); |
71 |
71 |
72 // Verify that the ID matches one of the existing mailboxes. |
|
73 if (mailboxExistsById(mailboxNmId)) { |
72 if (mailboxExistsById(mailboxNmId)) { |
74 |
73 // Fetch inbox id |
75 // Get standard folder inbox id. |
74 NmId inboxId = mUiEngine.standardFolderId(mailboxNmId, NmFolderInbox); |
76 const NmId inboxId = mUiEngine.standardFolderId(mailboxNmId, NmFolderInbox); |
|
77 |
|
78 // Bring the application to the foreground. |
75 // Bring the application to the foreground. |
79 XQServiceUtil::toBackground(false); |
76 if (!XQServiceUtil::isEmbedded()) { |
|
77 XQServiceUtil::toBackground(false); |
|
78 } |
80 if (mApplication) { |
79 if (mApplication) { |
81 HbMainWindow *mainWindow = mApplication->mainWindow(); |
80 HbMainWindow *mainWindow = mApplication->mainWindow(); |
82 mainWindow->show(); |
81 mainWindow->show(); |
83 |
82 |
84 // Launch the message list view. |
83 // Launch the message list view. |
91 NULL, // address list |
90 NULL, // address list |
92 NULL, // attachment list |
91 NULL, // attachment list |
93 true); // start as service |
92 true); // start as service |
94 mApplication->enterNmUiView(startParam); |
93 mApplication->enterNmUiView(startParam); |
95 } |
94 } |
96 |
95 |
97 completeRequest(mAsyncReqId, 0); |
96 completeRequest(mAsyncReqId, 0); |
98 } |
97 } |
99 else { |
98 else { |
100 // No mailbox found with the given ID. |
99 // No mailbox found with the given ID or Inbox ID is not known |
101 |
100 |
102 // if started as embedded, do not hide the app |
101 // if started as embedded, do not hide the app |
103 if (!XQServiceUtil::isEmbedded() && !visible) { |
102 if (!XQServiceUtil::isEmbedded() && !visible) { |
104 XQServiceUtil::toBackground(true); |
103 XQServiceUtil::toBackground(true); |
105 } |
104 } |
136 for (int i = 0; i < mailboxCount; ++i) { |
135 for (int i = 0; i < mailboxCount; ++i) { |
137 modelIndex = mailboxListModel.index(i, 0); |
136 modelIndex = mailboxListModel.index(i, 0); |
138 mailbox = mailboxListModel.data(modelIndex); |
137 mailbox = mailboxListModel.data(modelIndex); |
139 mailboxMetaData = mailbox.value<NmMailboxMetaData*>(); |
138 mailboxMetaData = mailbox.value<NmMailboxMetaData*>(); |
140 if (mailboxMetaData) { |
139 if (mailboxMetaData) { |
141 currentId = mailboxMetaData->id(); |
140 currentId = mailboxMetaData->id(); |
142 } |
141 } |
143 |
142 |
144 if (currentId.id() == mailboxId.id()) { |
143 if (currentId.id() == mailboxId.id()) { |
145 // Found a mailbox with the matching ID. |
144 // Found a mailbox with the matching ID. |
146 return true; |
145 return true; |