summaryrefslogtreecommitdiffstats
path: root/framework/src/domain/maillistmodel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'framework/src/domain/maillistmodel.cpp')
-rw-r--r--framework/src/domain/maillistmodel.cpp32
1 files changed, 32 insertions, 0 deletions
diff --git a/framework/src/domain/maillistmodel.cpp b/framework/src/domain/maillistmodel.cpp
index 0f477624..73d686eb 100644
--- a/framework/src/domain/maillistmodel.cpp
+++ b/framework/src/domain/maillistmodel.cpp
@@ -302,3 +302,35 @@ QVariant MailListModel::mail() const
302} 302}
303 303
304 304
305void MailListModel::setShowDrafts(bool)
306{
307 using namespace Sink::ApplicationDomain;
308 Sink::Query query;
309 // query.setFlags(Sink::Query::LiveQuery | Sink::Query::UpdateStatus);
310 query.filter<Mail::Draft>(true);
311 query.request<Mail::Subject>();
312 query.request<Mail::Sender>();
313 query.request<Mail::To>();
314 query.request<Mail::Cc>();
315 query.request<Mail::Bcc>();
316 query.request<Mail::Date>();
317 query.request<Mail::Unread>();
318 query.request<Mail::Important>();
319 query.request<Mail::Draft>();
320 query.request<Mail::Folder>();
321 query.request<Mail::Sent>();
322 query.request<Mail::Trash>();
323 query.request<Mail::MimeMessage>();
324 query.request<Mail::FullPayloadAvailable>();
325 mFetchMails = true;
326 mFetchedMails.clear();
327 qDebug() << "Running mail query for drafts: ";
328 //Latest mail at the top
329 sort(0, Qt::AscendingOrder);
330 runQuery(query);
331}
332
333bool MailListModel::showDrafts() const
334{
335 return false;
336}