summaryrefslogtreecommitdiffstats
path: root/framework/src/domain/maillistmodel.cpp
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2017-05-10 16:26:46 +0200
committerChristian Mollekopf <chrigi_1@fastmail.fm>2017-05-11 10:32:38 +0200
commit03fd92efdb0407b34beee13a0d2f4888b4397916 (patch)
treed24f57edc3489b531984c8f07e8ba2f4680a5e67 /framework/src/domain/maillistmodel.cpp
parent24cd706a39ac50c77dd9b88f50b8197bb2013173 (diff)
downloadkube-03fd92efdb0407b34beee13a0d2f4888b4397916.tar.gz
kube-03fd92efdb0407b34beee13a0d2f4888b4397916.zip
A new composer based on Kube.View
Kube.View is a sort of split-view that always only shows a fixed number of splits (and doesn't support manual resizing).
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}