summaryrefslogtreecommitdiffstats
path: root/framework
diff options
context:
space:
mode:
Diffstat (limited to 'framework')
-rw-r--r--framework/mail/actions/sinkactions.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/framework/mail/actions/sinkactions.cpp b/framework/mail/actions/sinkactions.cpp
index 8918f996..63b837aa 100644
--- a/framework/mail/actions/sinkactions.cpp
+++ b/framework/mail/actions/sinkactions.cpp
@@ -73,3 +73,17 @@ static ActionHandlerHelper deleteHandler("org.kde.kube.actions.delete",
73 Sink::Store::remove(*mail).exec(); 73 Sink::Store::remove(*mail).exec();
74 } 74 }
75); 75);
76
77static ActionHandlerHelper synchronizeHandler("org.kde.kube.actions.synchronize",
78 [](Context *context) -> bool {
79 return context->property("folder").isValid();
80 },
81 [](Context *context) {
82 auto folder = context->property("folder").value<Sink::ApplicationDomain::Folder::Ptr>();
83 if (!folder) {
84 qWarning() << "Failed to get the folder: " << context->property("folder");
85 return;
86 }
87 Sink::Store::synchronize(Sink::Query::ResourceFilter(folder->resourceInstanceIdentifier())).exec();
88 }
89);