diff options
Diffstat (limited to 'framework/mail/actions/sinkactions.cpp')
-rw-r--r-- | framework/mail/actions/sinkactions.cpp | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/framework/mail/actions/sinkactions.cpp b/framework/mail/actions/sinkactions.cpp index e00d3947..a19ab149 100644 --- a/framework/mail/actions/sinkactions.cpp +++ b/framework/mail/actions/sinkactions.cpp | |||
@@ -68,3 +68,39 @@ static ActionHandlerHelper synchronizeHandler("org.kde.kube.actions.synchronize" | |||
68 | Sink::Store::synchronize(Sink::Query::ResourceFilter(folder->resourceInstanceIdentifier())).exec(); | 68 | Sink::Store::synchronize(Sink::Query::ResourceFilter(folder->resourceInstanceIdentifier())).exec(); |
69 | } | 69 | } |
70 | ); | 70 | ); |
71 | |||
72 | // static ActionHandlerHelper saveAsDraft("org.kde.kube.actions.save-as-draft", | ||
73 | // [](Context *context) -> bool { | ||
74 | // return context->property("mail").isValid(); | ||
75 | // }, | ||
76 | // [](Context *context) { | ||
77 | // Sink::Query query; | ||
78 | // query += Sink::Query::RequestedProperties(QByteArrayList() << "name") | ||
79 | // //FIXME do something like specialuse? | ||
80 | // query += Sink::Query::PropertyFilter("name", "Drafts"); | ||
81 | // // query += Sink::Query::PropertyContainsFilter("specialuser", "drafts"); | ||
82 | // query += Sink::Query::PropertyFilter("drafts", true); | ||
83 | // //TODO Use drafts folder of that specific account | ||
84 | // Sink::Store::fetchAll<Sink::ApplicationDomain::Folder>(query) | ||
85 | // .then<void, QList<Sink::ApplicationDomain::Folder>>([](const QList<Sink::ApplicationDomain::Folder> folders) { | ||
86 | // if (folders.isEmpty()) { | ||
87 | // return KAsync::start([]() { | ||
88 | // //If message is already existing, modify, otherwise create | ||
89 | // }); | ||
90 | // } | ||
91 | // }); | ||
92 | // //TODO | ||
93 | // // * Find drafts folder | ||
94 | // // * Store KMime::Message on disk for use in blob property | ||
95 | // // * Check if message is already existing and either create or update | ||
96 | // // * | ||
97 | // // auto mail = context->property("mail").value<Sink::ApplicationDomain::Mail::Ptr>(); | ||
98 | // // if (!mail) { | ||
99 | // // qWarning() << "Failed to get the mail mail: " << context->property("mail"); | ||
100 | // // return; | ||
101 | // // } | ||
102 | // // mail->setProperty("unread", false); | ||
103 | // // qDebug() << "Mark as read " << mail->identifier(); | ||
104 | // // Sink::Store::modify(*mail).exec(); | ||
105 | // } | ||
106 | // ); | ||