From 4542730a5d01803bd8d5060e60fe9cb1d6e1990a Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Tue, 28 Mar 2017 11:19:55 +0200 Subject: Exclude trash in non-trash folders. This will ensure that the count doesn't include deleted emails. --- framework/domain/maillistmodel.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'framework/domain') 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) } mCurrentQueryItem = folder->identifier(); Sink::Query query = Sink::StandardQueries::threadLeaders(*folder); + if (!folder->getSpecialPurpose().contains(Sink::ApplicationDomain::SpecialPurpose::Mail::trash)) { + //Filter trash if this is not a trash folder + query.filter(false); + } query.setFlags(Sink::Query::LiveQuery); query.limit(100); query.request(); -- cgit v1.2.3