summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2017-03-17 16:27:23 +0100
committerChristian Mollekopf <chrigi_1@fastmail.fm>2017-03-17 16:27:23 +0100
commitbe7f4d42d70922608ed6898717232bd78fe528e4 (patch)
tree1fedebb38e416fc268edef844400a034c9862134
parentfeb1ea5739e2e33c4debcdd21a176f15991a64e5 (diff)
downloadkube-be7f4d42d70922608ed6898717232bd78fe528e4.tar.gz
kube-be7f4d42d70922608ed6898717232bd78fe528e4.zip
Request sent property and some others
-rw-r--r--framework/domain/maillistmodel.cpp6
-rw-r--r--framework/domain/maillistmodel.h1
-rw-r--r--framework/domain/settings/accountsettings.cpp2
3 files changed, 8 insertions, 1 deletions
diff --git a/framework/domain/maillistmodel.cpp b/framework/domain/maillistmodel.cpp
index c96f6dd1..11fb9f82 100644
--- a/framework/domain/maillistmodel.cpp
+++ b/framework/domain/maillistmodel.cpp
@@ -48,6 +48,7 @@ QHash< int, QByteArray > MailListModel::roleNames() const
48 roles[Unread] = "unread"; 48 roles[Unread] = "unread";
49 roles[Important] = "important"; 49 roles[Important] = "important";
50 roles[Draft] = "draft"; 50 roles[Draft] = "draft";
51 roles[Sent] = "sent";
51 roles[Trash] = "trash"; 52 roles[Trash] = "trash";
52 roles[Id] = "id"; 53 roles[Id] = "id";
53 roles[MimeMessage] = "mimeMessage"; 54 roles[MimeMessage] = "mimeMessage";
@@ -105,6 +106,8 @@ QVariant MailListModel::data(const QModelIndex &idx, int role) const
105 return mail->getProperty("importantCollected").toList().contains(true); 106 return mail->getProperty("importantCollected").toList().contains(true);
106 case Draft: 107 case Draft:
107 return mail->getDraft(); 108 return mail->getDraft();
109 case Sent:
110 return mail->getSent();
108 case Trash: 111 case Trash:
109 return mail->getTrash(); 112 return mail->getTrash();
110 case Id: 113 case Id:
@@ -162,6 +165,7 @@ void MailListModel::setParentFolder(const QVariant &parentFolder)
162 query.request<Mail::Unread>(); 165 query.request<Mail::Unread>();
163 query.request<Mail::Important>(); 166 query.request<Mail::Important>();
164 query.request<Mail::Draft>(); 167 query.request<Mail::Draft>();
168 query.request<Mail::Sent>();
165 query.request<Mail::Trash>(); 169 query.request<Mail::Trash>();
166 query.request<Mail::Folder>(); 170 query.request<Mail::Folder>();
167 mFetchMails = false; 171 mFetchMails = false;
@@ -200,6 +204,8 @@ void MailListModel::setMail(const QVariant &variant)
200 query.request<Mail::Unread>(); 204 query.request<Mail::Unread>();
201 query.request<Mail::Important>(); 205 query.request<Mail::Important>();
202 query.request<Mail::Draft>(); 206 query.request<Mail::Draft>();
207 query.request<Mail::Folder>();
208 query.request<Mail::Sent>();
203 query.request<Mail::Trash>(); 209 query.request<Mail::Trash>();
204 query.request<Mail::MimeMessage>(); 210 query.request<Mail::MimeMessage>();
205 query.request<Mail::FullPayloadAvailable>(); 211 query.request<Mail::FullPayloadAvailable>();
diff --git a/framework/domain/maillistmodel.h b/framework/domain/maillistmodel.h
index 96cf98f2..5526a991 100644
--- a/framework/domain/maillistmodel.h
+++ b/framework/domain/maillistmodel.h
@@ -51,6 +51,7 @@ public:
51 Unread, 51 Unread,
52 Important, 52 Important,
53 Draft, 53 Draft,
54 Sent,
54 Trash, 55 Trash,
55 Id, 56 Id,
56 MimeMessage, 57 MimeMessage,
diff --git a/framework/domain/settings/accountsettings.cpp b/framework/domain/settings/accountsettings.cpp
index d072ea9d..d1019e1f 100644
--- a/framework/domain/settings/accountsettings.cpp
+++ b/framework/domain/settings/accountsettings.cpp
@@ -178,7 +178,7 @@ void AccountSettings::saveAccount()
178void AccountSettings::loadAccount() 178void AccountSettings::loadAccount()
179{ 179{
180 Q_ASSERT(!mAccountIdentifier.isEmpty()); 180 Q_ASSERT(!mAccountIdentifier.isEmpty());
181 Store::fetchOne<SinkAccount>(Query().filter(mAccountIdentifier)) 181 Store::fetchOne<SinkAccount>(Query().filter(mAccountIdentifier).request<SinkAccount::Icon>().request<SinkAccount::Name>().request<SinkAccount::AccountType>())
182 .then([this](const SinkAccount &account) { 182 .then([this](const SinkAccount &account) {
183 mAccountType = account.getAccountType().toLatin1(); 183 mAccountType = account.getAccountType().toLatin1();
184 mIcon = account.getIcon(); 184 mIcon = account.getIcon();