diff options
Diffstat (limited to 'common/synchronizer.cpp')
-rw-r--r-- | common/synchronizer.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/common/synchronizer.cpp b/common/synchronizer.cpp index 3b32e68..d6b1c1f 100644 --- a/common/synchronizer.cpp +++ b/common/synchronizer.cpp | |||
@@ -593,17 +593,13 @@ KAsync::Job<void> Synchronizer::replay(const QByteArray &type, const QByteArray | |||
593 | KAsync::Job<QByteArray> job = KAsync::null<QByteArray>(); | 593 | KAsync::Job<QByteArray> job = KAsync::null<QByteArray>(); |
594 | //TODO This requires supporting every domain type here as well. Can we solve this better so we can do the dispatch somewhere centrally? | 594 | //TODO This requires supporting every domain type here as well. Can we solve this better so we can do the dispatch somewhere centrally? |
595 | if (type == ApplicationDomain::getTypeName<ApplicationDomain::Folder>()) { | 595 | if (type == ApplicationDomain::getTypeName<ApplicationDomain::Folder>()) { |
596 | auto folder = store().readEntity<ApplicationDomain::Folder>(key); | 596 | job = replay(store().readEntity<ApplicationDomain::Folder>(key), operation, oldRemoteId, modifiedProperties); |
597 | job = replay(folder, operation, oldRemoteId, modifiedProperties); | ||
598 | } else if (type == ApplicationDomain::getTypeName<ApplicationDomain::Mail>()) { | 597 | } else if (type == ApplicationDomain::getTypeName<ApplicationDomain::Mail>()) { |
599 | auto mail = store().readEntity<ApplicationDomain::Mail>(key); | 598 | job = replay(store().readEntity<ApplicationDomain::Mail>(key), operation, oldRemoteId, modifiedProperties); |
600 | job = replay(mail, operation, oldRemoteId, modifiedProperties); | ||
601 | } else if (type == ApplicationDomain::getTypeName<ApplicationDomain::Contact>()) { | 599 | } else if (type == ApplicationDomain::getTypeName<ApplicationDomain::Contact>()) { |
602 | auto mail = store().readEntity<ApplicationDomain::Contact>(key); | 600 | job = replay(store().readEntity<ApplicationDomain::Contact>(key), operation, oldRemoteId, modifiedProperties); |
603 | job = replay(mail, operation, oldRemoteId, modifiedProperties); | ||
604 | } else if (type == ApplicationDomain::getTypeName<ApplicationDomain::Addressbook>()) { | 601 | } else if (type == ApplicationDomain::getTypeName<ApplicationDomain::Addressbook>()) { |
605 | auto mail = store().readEntity<ApplicationDomain::Addressbook>(key); | 602 | job = replay(store().readEntity<ApplicationDomain::Addressbook>(key), operation, oldRemoteId, modifiedProperties); |
606 | job = replay(mail, operation, oldRemoteId, modifiedProperties); | ||
607 | } else { | 603 | } else { |
608 | SinkErrorCtx(mLogCtx) << "Replayed unknown type: " << type; | 604 | SinkErrorCtx(mLogCtx) << "Replayed unknown type: " << type; |
609 | } | 605 | } |