Commit 9856dc9a authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Continue to implement mailmerge agent

parent 3b629b27
......@@ -136,9 +136,9 @@ void MailMergeAgent::configure(WId windowId)
void MailMergeAgent::removeItem(qint64 item)
{
// if (mManager->itemRemoved(item)) {
// reload();
// }
if (mManager->itemRemoved(item)) {
reload();
}
}
void MailMergeAgent::addItem(qint64 timestamp,
......@@ -164,15 +164,15 @@ void MailMergeAgent::addItem(qint64 timestamp,
void MailMergeAgent::itemsRemoved(const Akonadi::Item::List &items)
{
// bool needToReload = false;
// for (const Akonadi::Item &item : items) {
// if (mManager->itemRemoved(item.id())) {
// needToReload = true;
// }
// }
// if (needToReload) {
// reload();
// }
bool needToReload = false;
for (const Akonadi::Item &item : items) {
if (mManager->itemRemoved(item.id())) {
needToReload = true;
}
}
if (needToReload) {
reload();
}
}
void MailMergeAgent::itemsMoved(const Akonadi::Item::List &items,
......
......@@ -24,3 +24,15 @@ QString MailMergeManager::printDebugInfo() const
void MailMergeManager::load(bool state) {}
void MailMergeManager::stopAll() {}
bool MailMergeManager::itemRemoved(Akonadi::Item::Id id)
{
// TODO
// if (mConfig->hasGroup(SendLaterUtil::sendLaterPattern().arg(id))) {
// removeInfo(id);
// mConfig->reparseConfiguration();
// Q_EMIT needUpdateConfigDialogBox();
// return true;
// }
return false;
}
......@@ -6,6 +6,7 @@
#pragma once
#include <AkonadiCore/Item>
#include <QObject>
class MailMergeManager : public QObject
......@@ -17,4 +18,5 @@ public:
Q_REQUIRED_RESULT QString printDebugInfo() const;
void load(bool state = false);
void stopAll();
Q_REQUIRED_RESULT bool itemRemoved(Akonadi::Item::Id id);
};
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