diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-08-11 20:16:20 -0600 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-08-11 20:16:20 -0600 |
commit | c22c91df4a35ce8fefad409f1ae265c74b8ede14 (patch) | |
tree | c8b4112dd8b5b72b8639db05d3c5f4ac346c8df3 | |
parent | 2f38db2da3ccd93d21fa8326bfdc6bd8b115ef70 (diff) | |
download | sink-c22c91df4a35ce8fefad409f1ae265c74b8ede14.tar.gz sink-c22c91df4a35ce8fefad409f1ae265c74b8ede14.zip |
Cleanup
-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 | } |