summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--framework/domain/actions/sinkactions.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/framework/domain/actions/sinkactions.cpp b/framework/domain/actions/sinkactions.cpp
index cc8d324e..f996b91d 100644
--- a/framework/domain/actions/sinkactions.cpp
+++ b/framework/domain/actions/sinkactions.cpp
@@ -84,11 +84,13 @@ static ActionHandlerHelper synchronizeHandler("org.kde.kube.actions.synchronize"
84 }, 84 },
85 [](Context *context) { 85 [](Context *context) {
86 if (auto folder = context->property("folder").value<Folder::Ptr>()) { 86 if (auto folder = context->property("folder").value<Folder::Ptr>()) {
87 SinkLog() << "Synchronizing resource " << folder->resourceInstanceIdentifier(); 87 SinkLog() << "Synchronizing folder " << folder->resourceInstanceIdentifier() << folder->identifier();
88 Store::synchronize(Query().resourceFilter(folder->resourceInstanceIdentifier())).exec(); 88 auto scope = SyncScope().resourceFilter(folder->resourceInstanceIdentifier()).filter<Mail::Folder>(QVariant::fromValue(folder->identifier()));
89 scope.setType<ApplicationDomain::Mail>();
90 Store::synchronize(scope).exec();
89 } else { 91 } else {
90 SinkLog() << "Synchronizing all"; 92 SinkLog() << "Synchronizing all";
91 Store::synchronize(Query()).exec(); 93 Store::synchronize(SyncScope()).exec();
92 } 94 }
93 } 95 }
94); 96);