diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-03-28 11:19:55 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-03-28 11:19:55 +0200 |
commit | 4542730a5d01803bd8d5060e60fe9cb1d6e1990a (patch) | |
tree | d40693a07c09aa66c9b456f2320d869f1434451a /framework/domain | |
parent | 99293aec6986cd2a6e6022c5882a8f9de0335621 (diff) | |
download | kube-4542730a5d01803bd8d5060e60fe9cb1d6e1990a.tar.gz kube-4542730a5d01803bd8d5060e60fe9cb1d6e1990a.zip |
Exclude trash in non-trash folders.
This will ensure that the count doesn't include deleted emails.
Diffstat (limited to 'framework/domain')
-rw-r--r-- | framework/domain/maillistmodel.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/framework/domain/maillistmodel.cpp b/framework/domain/maillistmodel.cpp index 3a507e05..83340f69 100644 --- a/framework/domain/maillistmodel.cpp +++ b/framework/domain/maillistmodel.cpp | |||
@@ -190,6 +190,10 @@ void MailListModel::setParentFolder(const QVariant &parentFolder) | |||
190 | } | 190 | } |
191 | mCurrentQueryItem = folder->identifier(); | 191 | mCurrentQueryItem = folder->identifier(); |
192 | Sink::Query query = Sink::StandardQueries::threadLeaders(*folder); | 192 | Sink::Query query = Sink::StandardQueries::threadLeaders(*folder); |
193 | if (!folder->getSpecialPurpose().contains(Sink::ApplicationDomain::SpecialPurpose::Mail::trash)) { | ||
194 | //Filter trash if this is not a trash folder | ||
195 | query.filter<Sink::ApplicationDomain::Mail::Trash>(false); | ||
196 | } | ||
193 | query.setFlags(Sink::Query::LiveQuery); | 197 | query.setFlags(Sink::Query::LiveQuery); |
194 | query.limit(100); | 198 | query.limit(100); |
195 | query.request<Mail::Subject>(); | 199 | query.request<Mail::Subject>(); |