Commit c7f7d6bd authored by Jonathan Marten's avatar Jonathan Marten

New mail notification: Fetch item parent so that message can be deleted

Differential Revision: https://phabricator.kde.org/D11255
parent 23462010
......@@ -694,11 +694,13 @@ bool KMKernel::showMail(qint64 serialNumber)
if (mainWidget) {
Akonadi::ItemFetchJob *job = new Akonadi::ItemFetchJob(Akonadi::Item(serialNumber), this);
job->fetchScope().fetchFullPayload();
job->fetchScope().setAncestorRetrieval(Akonadi::ItemFetchScope::Parent);
if (job->exec()) {
if (job->items().count() >= 1) {
KMReaderMainWin *win = new KMReaderMainWin(MessageViewer::Viewer::UseGlobalSetting, false);
const auto item = job->items().at(0);
win->showMessage(MessageCore::MessageCoreSettings::self()->overrideCharacterEncoding(),
job->items().at(0));
item, item.parentCollection());
win->show();
return true;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment